Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 234478 - sys-apps/portage-2.2_rc7 KeyError when ACCEPT_LICENSE is set
Summary: sys-apps/portage-2.2_rc7 KeyError when ACCEPT_LICENSE is set
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High blocker (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 210077
  Show dependency tree
 
Reported: 2008-08-11 16:36 UTC by Marek Sapota
Modified: 2008-08-12 20:25 UTC (History)
0 users

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


Attachments
fix the KeyError (keyerror_use.patch,840 bytes, patch)
2008-08-12 07:16 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Sapota 2008-08-11 16:36:20 UTC
portage-2.2_rc7 doesn't work, it fails to emerge anything, even lower working portage, the same errors are for any package:

emerge -1 --nodeps =portage-2.2_rc6


!!! Problem in '=sys-apps/portage-2.2_rc6' dependencies.
!!! 'USE' None
Traceback (most recent call last):
  File "/usr/bin/emerge", line 18, in <module>
    retval = _emerge.emerge_main()
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 13654, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 12643, in action_build
    retval, favorites = mydepgraph.select_files(myfiles)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 5028, in select_files
    myroot, atom, onlydeps=onlydeps)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 5276, in _select_pkg_highest_available
    ret = self._select_pkg_highest_available_imp(root, atom, onlydeps=onlydeps)
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 5398, in _select_pkg_highest_available_imp
    self._pkg_cache[pkg] = pkg
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 7914, in __setitem__
    if visible(root_config.settings, v) and \
  File "/usr/lib64/portage/pym/_emerge/__init__.py", line 1260, in visible
    if pkgsettings._getMissingLicenses(pkg.cpv, pkg.metadata):
  File "/usr/lib64/portage/pym/portage/__init__.py", line 2362, in _getMissingLicenses
    license_struct, uselist=metadata["USE"].split())
  File "/usr/lib64/portage/pym/portage/cache/mappings.py", line 217, in __getitem__
    raise KeyError(k)
KeyError: 'USE'

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-08-12 04:56:33 UTC
Please post your `emerge --info' too (or its traceback if that errors out as well).
Comment 2 Zac Medico gentoo-dev 2008-08-12 07:16:05 UTC
Created attachment 162722 [details, diff]
fix the KeyError

If this patch is saved as /tmp/keyerror_use.patch then it can be applied as follows:

patch /usr/lib/portage/pym/portage/__init__.py /tmp/keyerror_use.patch

Note that this bug is only triggered when the ACCEPT_LICENSE variable has been set.
Comment 3 Marek Sapota 2008-08-12 07:38:44 UTC
I'm back to rc6 - I've patched portage libs reverting rc7 patch and then I could go back, but emerge --info did work with rc7.

Portage 2.2_rc6 (default/linux/amd64/2008.0/desktop, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r6 x86_64)
=================================================================                                               
System uname: Linux-2.6.25-gentoo-r6-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T5250_@_1.50GHz-with-glibc2.2.5          
Timestamp of tree: Mon, 11 Aug 2008 13:00:01 +0000                                                              
app-shells/bash:     3.2_p39                                                                                    
dev-java/java-config: 1.3.7, 2.1.6-r1                                                                           
dev-lang/python:     2.5.2-r7                                                                                   
dev-python/pycrypto: 2.0.1-r6                                                                                   
sys-apps/baselayout: 2.0.0                                                                                      
sys-apps/openrc:     0.2.5                                                                                      
sys-apps/sandbox:    1.2.18.1-r3                                                                                
sys-devel/autoconf:  2.13, 2.62-r1                                                                              
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1                                               
sys-devel/binutils:  2.18-r3                                                                                    
sys-devel/gcc-config: 1.4.0-r4                                                                                  
sys-devel/libtool:   2.2.4                                                                                      
virtual/os-headers:  2.6.25-r4                                                                                  
ACCEPT_KEYWORDS="amd64 ~amd64"                                                                                  
CBUILD="x86_64-pc-linux-gnu"                                                                                    
CFLAGS="-march=native -O2 -pipe"                                                                                
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/4.1/env /usr/kde/4.1/share/config /usr/kde/4.1/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB en pl"
MAKEOPTS="-j4"
PKGDIR="/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="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/java-overlay /usr/local/portage/layman/sunrise /usr/local/portage/layman/gnash-cvs /usr/local/portage/layman/bazaar /usr/local/portage/layman/kdesvn-portage /usr/portage/local/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi addressbook alsa amd64 apache2 archive bash-completion berkdb bindist bittorrent bluetooth branding bsf bzip2 cairo caps cdio cdparanoia cdr chroot cli cracklib crypt cups dbus disk-partition dri dvd dvdr dvdread eds emboss encode esd evo exif exiv2 expat fam fat fbcon firefox flac fortran fuse gadu gcj gdbm gdl gif git glib glitz gmp gnome gnome-keyring gnutls gpg gpm gps gstreamer gtk gtkhtml hal hfs hpn htmlhandbook iceweasel iconv imagemagick imlib ipv6 isdnlog jabber java jfs jpeg jpeg2k kde kerberos laptop lcms ldap libnotify lm_sensors mad marble matroska midi mikmod mmx mmxext mng mp3 mpeg mudflap multilib musepack musicbrainz ncurses nepomuk network-cron networkmanager nls nptl nptlonly ntfs ogg opengl openmp pam pcre pdf perl php plasma pngppds pppd pulseaudio python qt3support qt4 quicktime readline reflection reiser4 reiserfs ruby samba sasl sdl sdl-image session sftp smp speex spell spl sqlite sqlite3 srt sse sse2 ssh ssl ssse3 startup-notification stream subversion svg symlink sysfs taglib tcpd theora threads tiff tk toolbar truetype twolame unicode usb utils v4l v4l2 vcd vcdx vim-syntax vlm vorbis xattr xfs xft xinerama xml xorg xulrunner xv zero zip zlib" ALSA_CARDS="snd-hda-intel" 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 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="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en pl" USERLAND="GNU" VIDEO_CARDS="i810"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Zac Medico gentoo-dev 2008-08-12 20:25:26 UTC
This is fixed in 2.2_rc8.