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

Bug 250902

Summary: sys-apps/portage-2.2_rc17 fails with kde-live ebuilds
Product: Gentoo Linux Reporter: Volker Hemmann <volkerarmin>
Component: [OLD] Core systemAssignee: Portage team <dev-portage>
Severity: normal CC: kde, pchrist
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 240323, 210077    
Attachments: warn when necessary don't erroneously preserved master links

Description Volker Hemmann 2008-12-14 09:01:57 UTC
after compiling I get this error:
Installing app-misc/strigi-9999
Traceback (most recent call last): 
  File "/usr/bin/emerge", line 18, in <module>
    retval = _emerge.emerge_main()            
  File "//usr/lib64/portage/pym/_emerge/", line 14543, in emerge_main
    myopts, myaction, myfiles, spinner)                                         
  File "//usr/lib64/portage/pym/_emerge/", line 13522, in action_build
    retval = mergetask.merge()                                                   
  File "//usr/lib64/portage/pym/_emerge/", line 9896, in merge        
    rval = self._merge()                                                         
  File "//usr/lib64/portage/pym/_emerge/", line 10138, in _merge      
  File "//usr/lib64/portage/pym/_emerge/", line 10266, in _main_loop  
  File "//usr/lib64/portage/pym/_emerge/", line 8823, in _poll_loop   
    handler(f, event)                                                            
  File "//usr/lib64/portage/pym/_emerge/", line 2231, in _output_handler
  File "//usr/lib64/portage/pym/_emerge/", line 1685, in wait           
  File "//usr/lib64/portage/pym/_emerge/", line 1758, in _wait_hook     
  File "//usr/lib64/portage/pym/_emerge/", line 2664, in _buildpkg_exit 
  File "//usr/lib64/portage/pym/_emerge/", line 1685, in wait           
  File "//usr/lib64/portage/pym/_emerge/", line 1758, in _wait_hook     
  File "//usr/lib64/portage/pym/_emerge/", line 1941, in _default_final_exit
    return self.wait()                                                                 
  File "//usr/lib64/portage/pym/_emerge/", line 1685, in wait
  File "//usr/lib64/portage/pym/_emerge/", line 1758, in _wait_hook
  File "//usr/lib64/portage/pym/_emerge/", line 10118, in _build_exit
  File "//usr/lib64/portage/pym/_emerge/", line 8736, in _schedule
    return self._schedule_tasks()
  File "//usr/lib64/portage/pym/_emerge/", line 10285, in _schedule_tasks
    if q.schedule():
  File "//usr/lib64/portage/pym/_emerge/", line 8628, in schedule
  File "//usr/lib64/portage/pym/_emerge/", line 1666, in start
  File "//usr/lib64/portage/pym/_emerge/", line 3708, in _start
    self.returncode = self.merge.merge()
  File "//usr/lib64/portage/pym/_emerge/", line 3675, in merge
    retval = self._install_task.install()
  File "//usr/lib64/portage/pym/_emerge/", line 2703, in install
    rval = merge.execute()
  File "//usr/lib64/portage/pym/_emerge/", line 3045, in execute
  File "//usr/lib64/portage/pym/portage/", line 6181, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "//usr/lib64/portage/pym/portage/dbapi/", line 3850, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "//usr/lib64/portage/pym/portage/dbapi/", line 3860, in _merge
    cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "//usr/lib64/portage/pym/portage/dbapi/", line 3427, in treewalk
  File "//usr/lib64/portage/pym/portage/dbapi/", line 2051, in unmerge
    cpv_lib_map = self._find_unused_preserved_libs()
  File "//usr/lib64/portage/pym/portage/dbapi/", line 2722, in _find_unused_preserved_libs
    cpv = path_cpv_map[obj]
KeyError: '/usr/kde/live/lib64/'

yesterday it started after ~170 of 200 something ebuilds, today it started with the first one, strigi - the error message is always the same. It happens with preserved-libs feature turned on and off.

Reproducible: Always

Steps to Reproduce:
1. install kde-crazy overlay
2.emerge --keep-going @kde-live
3. wait

emerge --info
WARNING: One or more repositories have missing repo_name entries:


NOTE: Each repo_name entry should be a plain text file containing a
unique name for the repository on the first line.                  
 * Overlay eclasses override eclasses from PORTDIR:                
 *   '/usr/local/portage/layman/games/eclass/games.eclass'         
 *   '/usr/local/portage/layman/kde-crazy/eclass/kde4-base.eclass' 
 *   '/usr/local/portage/layman/kde-crazy/eclass/kde4-functions.eclass'
 *   '/usr/local/portage/layman/kde-crazy/eclass/kde4-meta.eclass'     
 *   '/usr/local/portage/layman/kde-crazy/eclass/qt4-build.eclass'     
 * It is best to avoid overriding eclasses from PORTDIR because it will
 * trigger invalidation of cached ebuild metadata that is distributed with
 * the portage tree. If you must override eclasses from PORTDIR then you  
 * are advised to add FEATURES="metadata-transfer" to /etc/make.conf and to
 * run `emerge --regen` after each time that you run `emerge --sync`. Set  
 * PORTAGE_ECLASS_WARNING_ENABLE="0" in /etc/make.conf if you would like to
 * disable this warning.                                                   
Error during set creation: Redefinition of set 'kde-4.2' (sections: 'usersets', 'kde sets')
Portage 2.2_rc17 (default/linux/amd64/2008.0/desktop, gcc-4.3.2, glibc-2.9_p20081201-r0, x86_64)
System uname: Linux-       
Timestamp of tree: Sun, 14 Dec 2008 02:32:01 +0000                                                              
ccache version 2.4 [enabled]                                                                                    
app-shells/bash:     3.2_p48                                                                                    
dev-java/java-config: 1.3.7-r1, 2.1.6-r1                                                                        
dev-lang/python:     2.5.2-r8                                                                                   
dev-util/ccache:     2.4-r8                                                                                     
dev-util/cmake:      2.6.2                                                                                      
sys-apps/baselayout: 2.0.0                                                                                      
sys-apps/openrc:     0.3.0-r1                                                                                   
sys-devel/autoconf:  2.13, 2.63                                                                                 
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2                                                  
sys-devel/binutils:  2.19                                                                                       
sys-devel/gcc-config: 1.4.0-r4                                                                                  
sys-devel/libtool:   2.2.6a                                                                                     
virtual/os-headers:  2.6.27-r2                                                                                  
ACCEPT_KEYWORDS="amd64 ~amd64"                                                                                  
CFLAGS="-march=k8-sse3 -O2 -msse3 -pipe"                                                                        
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.1/env /usr/kde/4.1/share/config /usr/kde/4.1/shutdown /usr/kde/4.2/env /usr/kde/4.2/share/config /usr/kde/4.2/shutdown /usr/kde/live/env /usr/kde/live/share/config /usr/kde/live/shutdown /usr/share/config"                    
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=k8-sse3 -O2 -msse3 -pipe"                                                                                                                       
FEATURES="autoconfig buildpkg candy ccache distlocks fixpackages metadata-transfer parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/usr/local/portage/layman/games /usr/local/portage/layman/kde-crazy /usr/local/portage"
USE="3dnow 3dnowext 7zip S3TC X Xaw3d a52 aac acpi addbookmarks aiglx aim aio akode alias alsa altenburgcards amarok amd64 amr amrnb amrwb aotuv aqua_theme archive asf athena audiofile autoreplace avahi bash-completion berkdb binary-drivers bluetooth boost branding bzip2 cairo captury cdaudio cdda cddb cdinstall cdparanoia cdr cdrom cdsound cegui clamav cli connectionstatus consolekit contactnotes cracklib crypt css cups curl dbus depth32 dhcp dio divx dnd double-precision dpmsdri dts dv dvb dvbplayer dvbsetup dvd dvdr dvdread eds emboss emerald emovix emul-linux-x86 encode evo exif exiv2 expat exscalibar extra-cardsets fame fasttrackffmpeg fftw file filter_default filter_legacy filter_light firefox fits flac fontconfig foomaticdb fortran ftp gadu gammu gd gdbm gif gimp gimpprint glitz glut glx gnokii gnutella gpgme gpm hal hddtemp highlight history iconv icq icu id3 id3tag ieee1394 imagemagick inotify ipv6 irc irmc isdnlog jabber java javascript jce joystick jpeg jpeg2k kate kcal kde kdecards kdeenablefinal kdehiddenvisibility kdepim kdeprefix kdm kexi kipi lame lapack lcms lesstif libnotify libsamplerate libssh2 libwww lirc lm_sensors logitech-mouse lzo lzw mad magic mailbox maildir maps matroska mbox mdnsresponder-compat metric midi mikmod mime mixer mjpeg mmap mmx mmxext mng mp3 mp4 mpeg mpeg2 mplayer msn mtp mudflap mule multilib musepack music nano-syntax ncurses neXt nepomuk net network newspr ngui nls no-old-linux nocd nosendmail nova nowin nowlistening npp nptl nptlonly nsplugin ntfs obex offensive ogg ogg123 ogm openexr opengl openmp oscar pam paste64 pch pcre pda pdf perl physfs pixmaps plasma player plugins png pnm posix ppds pppd python qt3 qt3support qt4 quicktime rar readline recode reflection reiser4 reiserfs remix resolvconf rogue rtc samba sametime sasl scanner scenarios schedule scsi sdl sdl-image sdl-sound sdlaudio sendfile server session slp smp sms sndfile sockets sounds spell spl sqlite sqlite3 srt sse sse-filters sse2 sse3 ssh ssl ssse3 startup-notification statistics stats stencil-buffer stroke subp subtitles svg sysfs sysvipc szip tcpd texteffect textures tga theora threads threadsafe tiff timidity tk tomsfastmath toolbar tools transcode translator truetype tv tv_check tv_combiner tv_pick_cgi type1 unicode unzip usb userlocales utempter v4l v4l2 vcd videos visualization vorbis webdav webkit webpresence wifi wireshark wmf wmp wxwindows x264 xanim xcb xcomposite xemacs xext xface xine xml xorg xosd xpm xrandr xrender xscreensaver xskatcards xv xvid xvmc yahoo yiff yv12 zip zlib zsh-completion zvbi" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multinull 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 headersinclude 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" LIRC_DEVICES="devinput" USERLAND="GNU" VIDEO_CARDS="vesa v4l fglrx radeon radeonhd"
Comment 1 Zac Medico gentoo-dev 2008-12-14 18:34:35 UTC
It seems like symlinks to /usr/kde/live/lib64/ got preserved, but not the actual file itself. I'm not sure why this would happen. Please post the output of the following commands:

  portageq list_preserved_libs /
  portageq owners / /usr/kde/live/lib64/

FWIW, you should be able to avoid the KeyError if you manually removed '/usr/kde/live/lib64/'. It should be safe to remove it since it doesn't seem to have any consumers.
Comment 2 Volker Hemmann 2008-12-14 18:41:38 UTC
portageq list_preserved_libs /
kde-base/kontact-9999 /usr/kde/live/lib64/

portageq owners / /usr/kde/live/lib64/

Comment 3 Zac Medico gentoo-dev 2008-12-14 19:00:25 UTC
(In reply to comment #2)
> portageq list_preserved_libs /
> kde-base/kontact-9999 /usr/kde/live/lib64/

Apparently the preservation code preserved the master link, and it needs to be fixed to stop doing that. The correct workaround in this case is to remove /var/lib/portage/preserved_libs_registry since it only has that one file registered and so it doesn't hurt to remove the whole registry file.
Comment 4 Volker Hemmann 2008-12-14 19:26:00 UTC
thanks for your help. Removing the file seemed to work (I moved away the lib and its symlinks earlier because no app I use needs it anyway ...). 
Comment 5 Zac Medico gentoo-dev 2008-12-14 20:59:15 UTC
Created attachment 175282 [details, diff]
warn when necessary don't erroneously preserved master links

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

  patch /usr/lib/portage/pym/portage/dbapi/ /tmp/masterlink.patch

(In reply to comment #4)
> thanks for your help. Removing the file seemed to work (I moved away the lib
> and its symlinks earlier because no app I use needs it anyway ...). 

Actually, you might want to reinstall that file since it might still be used via dlopen even though nothing appears to link to it.
Comment 6 Volker Hemmann 2008-12-14 21:04:30 UTC
yeah, after removing /var/lib/portage/preserved_libs_registry I moved the lib and the symlinks back. I will try the patch later - I am updating kde-live at the moment - 83 packages left. But I don't see how I can test it. The problem seems to be solved after removing preserved_libs_registry.
Comment 7 Zac Medico gentoo-dev 2008-12-20 22:28:53 UTC
This is fixed in 2.2_rc18.
Comment 8 Volker Hemmann 2008-12-20 22:39:28 UTC
thank you very much Zac.