Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 572746 - Using getbinpkgs FEATURE produces a python traceback with sys-apps/portage-2.2.27
Summary: Using getbinpkgs FEATURE produces a python traceback with sys-apps/portage-2....
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: portage-2.3.0
  Show dependency tree
 
Reported: 2016-01-24 09:41 UTC by Uros
Modified: 2016-03-14 03:49 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 Uros 2016-01-24 09:41:18 UTC
I've been using distcc and buildpkg/getbinpkgs FEATURES for a while now with the following (related) setup in make.conf:

FEATURES="distcc distcc-pump nodoc getbinpkg buildpkg parallel-fetch -userfetch"
PKGDIR="/usr/portage/packages"

PORTAGE_BINHOST is/was not set.

Today after upgrade to sys-apps/portage-2.2.27 (from 2.2.26), the following traceback is produced after runnign any emerge command:

======== Traceback for invalid call to portage.package.ebuild.config.config.__getitem__ ========
  File "/usr/lib/python-exec/python2.7/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib64/python2.7/site-packages/_emerge/main.py", line 1185, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python2.7/site-packages/_emerge/actions.py", line 2866, in run_action
    getbinpkgs="--getbinpkg" in emerge_config.opts)
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/bintree.py", line 525, in populate
    self._populate(getbinpkgs)
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/bintree.py", line 778, in _populate
    if getbinpkgs and not self.settings["PORTAGE_BINHOST"]:
  File "/usr/lib64/python2.7/site-packages/portage/package/ebuild/config.py", line 2570, in __getitem__
    return self._getitem(key)
  File "/usr/lib64/python2.7/site-packages/portage/package/ebuild/config.py", line 2623, in _getitem
    raise KeyError(mykey)
KeyError: u'PORTAGE_BINHOST'
================================================================================================
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib64/python2.7/site-packages/_emerge/main.py", line 1185, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python2.7/site-packages/_emerge/actions.py", line 2866, in run_action
    getbinpkgs="--getbinpkg" in emerge_config.opts)
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/bintree.py", line 525, in populate
    self._populate(getbinpkgs)
  File "/usr/lib64/python2.7/site-packages/portage/dbapi/bintree.py", line 778, in _populate
    if getbinpkgs and not self.settings["PORTAGE_BINHOST"]:
  File "/usr/lib64/python2.7/site-packages/portage/package/ebuild/config.py", line 2570, in __getitem__
    return self._getitem(key)
  File "/usr/lib64/python2.7/site-packages/portage/package/ebuild/config.py", line 2623, in _getitem
    raise KeyError(mykey)
KeyError: u'PORTAGE_BINHOST'


Reproducible: Always




Portage 2.2.26 (python 2.7.11-final-0, default/linux/amd64/13.0/desktop/kde, gcc-5.3.0, glibc-2.22-r1, 4.1.12-gentoo x86_64)
=================================================================
System uname: Linux-4.1.12-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9550_@_2.83GHz-with-gentoo-2.2
KiB Mem:     8166188 total,   6495832 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 24 Jan 2016 08:15:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
distcc 3.2rc1 x86_64-pc-linux-gnu [enabled]
app-shells/bash:          4.3_p42-r1::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.1::gentoo
dev-lang/python:          2.7.11-r2::gentoo
dev-util/cmake:           3.4.2::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.20.4::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.14.1-r1::gentoo, 1.15-r1::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            5.3.0::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r1::gentoo
Repositories:

gentoo
    location: /usr/portage/tree
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: --info=progress2,name0,del0

anders-larsson
    location: /var/lib/layman/anders-larsson
    masters: gentoo
    priority: 0

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 1

tmacedo
    location: /var/lib/layman/tmacedo
    masters: gentoo
    priority: 2

local
    location: /usr/local/portage
    masters: gentoo
    priority: 3

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=y --autounmask-keep-masks"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distcc distcc-pump distlocks ebuild-locks fixlafiles merge-sync news nodoc parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="POSIX"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j17 -l4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--info=progress2,name0,del0"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="X aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm hfs iconv idn ipv6 jpeg kde kipi lcms libnotify mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl nptlonly nss nvidia ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qt3support qt4 readline samba seccomp session sse sse2 ssl startup-notification svg system-sqlite tcpd theora tiff truetype udev udisks unicode upower usb userlocales vdpau vorbis wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 sse4_1" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" NGINX_MODULES_HTTP="access auth_basic autoindex charset empty_gif fancyindex fastcgi gzip limit_req limit_zone map memcached proxy referer rewrite ssi scgi" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-0" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby20" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 2 Uros 2016-01-24 11:50:50 UTC
Tested a few minutes ago with sys-apps/portage-9999 and it works as expected.
Thanks.
Comment 3 Brian Dolbec gentoo-dev 2016-01-24 16:32:04 UTC
Please don't mark it resolved, we will do that when the code is in a regular release.

It will also help others find this bug (to save duplicates) and the patch they can add for epatch_user if they don't want to wait for the next release.
Comment 4 Uros 2016-01-25 11:01:51 UTC
Noted, thanks.
Comment 5 Zac Medico gentoo-dev 2016-03-14 03:49:55 UTC
Fixed in 2.2.28.