Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 427036

Summary: emerge fails with KeyError in pym module
Product: Gentoo Linux Reporter: Mark David Dumlao <madumlao>
Component: [OLD] UnspecifiedAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS, REGRESSION
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 423075    

Description Mark David Dumlao 2012-07-17 22:05:03 UTC
On 3 different machines (with similar, but not identical USE flags), emerge fails to start on most packages with the following traceback:

=== Sample emerge:
irix ~ # emerge -tv portage

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild   R    ] games-emulation/zsnes-1.51-r2  USE="opengl png -ao -custom-cflags" 0 kB
[ebuild   R    ] dev-java/xmlgraphics-commons-1.3.1  USE="jpeg -doc -examples -source -test" 0 kB
[ebuild   R    ] app-portage/gentoolkit-0.3.0.6-r3  0 kB
[ebuild   R    ] dev-db/hsqldb-1.8.1.3  USE="-doc -source -test" 0 kB
[ebuild   R    ] dev-java/rhino-1.7.2-r2  USE="-doc -examples -source" 0 kB
[ebuild   R    ] dev-java/xpp2-2.1.10-r1  USE="-doc -source" 0 kB
[ebuild   R    ] dev-java/xalan-2.7.1  USE="-doc -source" 0 kB
[ebuild   R    ] dev-java/commons-logging-1.1.1  USE="-avalon-framework -avalon-logkit -doc -log4j -servletapi -source -test" 0 kB
[ebuild     U  ]  sys-apps/portage-2.1.11.7 [2.1.11.5] USE="(ipc) python2 python3 xattr -build -doc -epydoc (-pypy1_9) (-selinux)" LINGUAS="-pl" 823 kB

Total: 9 packages (1 upgrade, 8 reinstalls), Size of downloads: 823 kB

Traceback (most recent call last):
  File "/usr/bin/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/main.py", line 2065, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 447, in action_build
    mydepgraph.saveNomergeFavorites()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 6782, in saveNomergeFavorites
    not root_config.sets[k].world_candidate:
KeyError: '__auto_rebuild__'
irix ~ #
=== /Sample emerge

I am now unable to emerge any packages, even to run an emerge --emptytree, or update portage.

Reproducible: Always

Steps to Reproduce:
1. emerge any package
Actual Results:  
Emerge fails with traceback.

Expected Results:  
Emerge runs or suggests a configuration error.

===  emerge --info output:
irix ~ # emerge --info
Portage 2.1.11.5 (default/linux/amd64/10.0/desktop, gcc-4.6.3, glibc-2.15-r2, 3.4.2-pf x86_64)
=================================================================
System uname: Linux-3.4.2-pf-x86_64-Intel-R-_Core-TM-_i7_CPU_Q_720_@_1.60GHz-with-gentoo-2.1
Timestamp of tree: Tue, 17 Jul 2012 20:15:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.7 [disabled]
app-shells/bash:          4.2_p29
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/ccache:          3.1.7
dev-util/cmake:           2.8.8-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.5, 1.12.1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo lisp gamerlay-stable madumlao games emacs systemd sunrise
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/tomoyo/conf /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=" --quiet-build=n --rebuild-if-new-rev=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.jaist.ac.jp/pub/Linux/Gentoo/ http://gentoo.cs.nctu.edu.tw/gentoo/ http://archive.mmu.edu.my/gentoo http://ftp.iij.ad.jp/pub/linux/gentoo/ http://mirrors.nl.kernel.org/gentoo/ "
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/lisp /var/lib/layman/gamerlay /var/lib/layman/madumlao /var/lib/layman/games /var/lib/layman/emacs /var/lib/layman/systemd /var/lib/layman/sunrise"
SYNC="rsync://rsync.jp.gentoo.org/gentoo-portage"
USE="X a52 aac aalib accessibility acl acpi alsa amd64 applet audit banshee bash-completion berkdb bindist bittorrent bluetooth bluray branding bzip2 cairo caps cdda cdr cjk cli clutter consolekit cracklib crypt cups curl cxx dbus dga dhcpcd dia directfb djvu dri dts dv dvd dvdr dvi eds emacs emboss encode exif expat fam fat ffmpeg firefox flac flash fortran fuse g3dvl gallium gdbm gif gimp gmp gnome gnome-keyring gnutls gpm graphviz gs gsf gsm gstreamer gtk gtk3 gzip hddtemp hfs html iconv icu ieee1394 imagemagick introspection ipv6 irda jack jemalloc jfs jpeg jpeg2k lame laptop lcms ldap libnotify libsamplerate lm_sensors lua lzma lzo mad maildir matroska mdadm midi mjpeg mmx mng modules mp3 mp4 mpeg mtp mudflap multilib musepack mysql mysqli nautilus ncurses networkmanager nls nptl nsplugin ntfs ntplonly nvidia offensive ogg openal openexr opengl openldap openmp pam pango pcmcia pcre pdf perl php png pnm policykit portaudio postgres ppds pppd pulseaudio python qt3support qt4 rar raw readline realtime reiser4 resolvconf rieserfs rtmp samba scanner schroedinger sdl session smartcard smp speex spell sqlite sqlite3 sse sse2 ssl startup-notification svg syslog systemd taglib tcpd tga theora threads tiff timidity tracker truetype udev udisks unicode upower usb v4l2 vala vcd vdpau vhosts vim vim-syntax vorbis wayland webp wifi wmf wxwidgets x264 xanim xattr xcb xfs xft xinerama xml xmp xorg xpm xv xvid xvmc zeitgeist zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="nss" 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 ubx" INPUT_DEVICES="evdev synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-4" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nouveau vesa 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:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
=== /emerge --info output
Comment 1 Zac Medico gentoo-dev 2012-07-18 17:20:43 UTC
This is fixed in git:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ed4e91f0473b5cfcbb1d6de22991bbf3e270a6e3

You can avoid the issue by removing --rebuild-if-new-rev=y from EMERGE_DEFAULT_OPTS in make.conf.
Comment 2 Zac Medico gentoo-dev 2012-07-18 22:57:16 UTC
This is fixed in 2.1.11.9 and 2.2.0_alpha120.