Gentoo Archives: gentoo-alt

From: Derek Harland <derek@××××××××××××××.com>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] Bug in portage.dbapi.vartree:LinkageMapMachO.isMasterLink ??
Date: Wed, 27 Aug 2008 05:48:21
Message-Id: CD5CD6D5-5E25-424B-A6A6-339F67733013@chocolate-fish.com
In Reply to: Re: [gentoo-alt] Bug in portage.dbapi.vartree:LinkageMapMachO.isMasterLink ?? by Fabian Groffen
1 Filed as a bug, its ticket is http://bugs.gentoo.org/show_bug.cgi?
2 id=235858
3
4 On 26/08/2008, at 7:39 PM, Fabian Groffen wrote:
5
6 > On 26-08-2008 19:27:39 +1200, Derek Harland wrote:
7 >> I've just updated portage and have found the following bug in
8 >> portage:
9 >
10 > I've gotta run for a plane, so won't be able to fix it instantly.
11 > Please do file a bug on this issue, assigned to Gentoo/Alt -> Prefix.
12 >
13 > Thanks!
14 >
15 >
16 >> emerge -u gettext
17 >>
18 >>>>> Installing sys-devel/gettext-0.17
19 >> Traceback (most recent call last):
20 >> File "/Volumes/MacData/Users/derek/gentoo/usr/bin/emerge", line
21 >> 20, in
22 >> <module>
23 >> retval = _emerge.emerge_main()
24 >> ...
25 >> File "/Volumes/MacData/Users/derek/gentoo/usr/lib/portage/pym/
26 >> portage/dbapi/vartree.py", line 2965, in _preserve_libs
27 >> if linkmap.isMasterLink(lib):
28 >> File "/Volumes/MacData/Users/derek/gentoo/usr/lib/portage/pym/
29 >> portage/dbapi/vartree.py", line 898, in isMasterLink
30 >> if obj_key not in self._obj_properties:
31 >> NameError: global name 'obj_key' is not defined
32 >>
33 >> Theres clearly a bug in this method, it seems to be missing a line to
34 >> compute obj_key
35 >>
36 >> def isMasterLink(self, obj):
37 >> """
38 >> Determine whether an object is a master link.
39 >>
40 >> @param obj: absolute path to an object
41 >> @type obj: string (example: '/usr/bin/foo')
42 >> @rtype: Boolean
43 >> @return:
44 >> 1. True if obj is a master link
45 >> 2. False if obj is not a master link
46 >>
47 >> """
48 >> basename = os.path.basename(obj)
49 >> if obj_key not in self._obj_properties:
50 >> raise KeyError("%s (%s) not in object list" % (obj_key, obj))
51 >> install_name = self._obj_properties[obj_key][1]
52 >> return (len(basename) < len(os.path.basename(install_name)))
53 >>
54 >> It should probably have the following added
55 >>
56 >> obj_key = self._ObjectKey(obj)
57 >>
58 >> (Note I'm very new to gentoo in all forms and no nothing about
59 >> portage
60 >> itself ... should I be filing this on gentoos bug tracker?)
61 >>
62 >> Here is my emerge --info
63 >>
64 >> $ emerge --info
65 >> Portage 2.2.00.11472-prefix (default-prefix/darwin/macos/10.4/x86,
66 >> gcc-4.0.1, unavailable, 8.11.1 i386)
67 >> =================================================================
68 >> System uname: Darwin-8.11.1-i386-32bit
69 >> Timestamp of tree: Tue, 26 Aug 2008 06:41:29 +0000
70 >> distcc 2.18.3-Apple.1 powerpc-apple-darwin8.0 (protocols 1 and 2)
71 >> (default port 3632) [disabled]
72 >> app-shells/bash: 3.2_p39
73 >> dev-lang/python: 2.4.4-r13, 2.5.2-r5
74 >> sys-devel/autoconf: 2.61-r2
75 >> sys-devel/automake: 1.10.1-r1
76 >> sys-devel/gcc-config: 1.4.0-r04.3
77 >> sys-devel/libtool: 1.5.26
78 >>
79 >> Derek.
80 >>
81 >>
82 >
83 > --
84 > Fabian Groffen
85 > Gentoo on a different level
86 >