Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 235858 - Error in portage: portage.dbapi.vartree:LinkageMapMachO.isMasterLink raises a NameError
Summary: Error in portage: portage.dbapi.vartree:LinkageMapMachO.isMasterLink raises a...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo non-Linux Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-27 05:46 UTC by Derek Harland
Modified: 2008-08-27 18:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Derek Harland 2008-08-27 05:46:48 UTC
Using Portage 2.2.00.11472-prefix then the following will fail

  emerge -u gettext

with a traceback from portage.  This is due to a method (isMasterLink) referencing an unknown variable obj_key.


portage.dbapi.vartree:LinkageMapMachO.isMasterLink looks like this ...

def isMasterLink(self, obj):
    " ... doc string removed ..."
    basename = os.path.basename(obj)
    if obj_key not in self._obj_properties:
        raise KeyError("%s (%s) not in object list" % (obj_key, obj))
    install_name = self._obj_properties[obj_key][1]
    return (len(basename) < len(os.path.basename(install_name)))

It should probably line added at the beginning ...

    obj_key = self._ObjectKey(obj)		



Reproducible: Always

Steps to Reproduce:
1. emerge -u gettext
2.
3.

Actual Results:  

>>> Installing sys-devel/gettext-0.17
Traceback (most recent call last):
  File "/Volumes/MacData/Users/derek/gentoo/usr/bin/emerge", line 20, in <module>
    retval = _emerge.emerge_main()
  ...
  File "/Volumes/MacData/Users/derek/gentoo/usr/lib/portage/pym/portage/dbapi/vartree.py", line 2965, in _preserve_libs
    if linkmap.isMasterLink(lib):
  File "/Volumes/MacData/Users/derek/gentoo/usr/lib/portage/pym/portage/dbapi/vartree.py", line 898, in isMasterLink
    if obj_key not in self._obj_properties:
NameError: global name 'obj_key' is not defined




Portage 2.2.00.11472-prefix (default-prefix/darwin/macos/10.4/x86, gcc-4.0.1, unavailable, 8.11.1 i386)
=================================================================
System uname: Darwin-8.11.1-i386-32bit
Timestamp of tree: Wed, 27 Aug 2008 00:31:31 +0000
distcc 2.18.3-Apple.1 powerpc-apple-darwin8.0 (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     3.2_p39
dev-lang/python:     2.4.4-r13, 2.5.2-r5
sys-devel/autoconf:  2.61-r2
sys-devel/automake:  1.10.1-r1
sys-devel/gcc-config: 1.4.0-r04.3
sys-devel/libtool:   1.5.26
ACCEPT_KEYWORDS="~x86-macos"
CBUILD="i686-apple-darwin8"
CFLAGS="-O2 -pipe -march=nocona"
CHOST="i686-apple-darwin8"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=nocona"
DISTDIR="/Volumes/MacData/Users/derek/gentoo/usr/portage/distfiles"
EPREFIX="/Volumes/MacData/Users/derek/gentoo"
FEATURES="collision-protect distlocks nostrip parallel-fetch preserve-libs sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS=""
PKGDIR="/Volumes/MacData/Users/derek/gentoo/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/Volumes/MacData/Users/derek/gentoo/var/tmp"
PORTDIR="/Volumes/MacData/Users/derek/gentoo/usr/portage"
PORTDIR_OVERLAY="/Volumes/MacData/Users/derek/gentoo/usr/portage/local/layman/prefix-users"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="aqua coreaudio cracklib midi mmx mmxext ncurses nls objc objc++ prefix readline sse sse2 ssl unicode x86-macos zlib" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="Darwin" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Fabian Groffen gentoo-dev 2008-08-27 18:18:15 UTC
Indeed, thanks!  Released in portage-2.2.00.11477.