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

Bug 181387

Summary: traceback when remerging portage with =sys-apps/portage-
Product: Portage Development Reporter: Jonathan Callen (RETIRED) <jcallen>
Component: CoreAssignee: Portage team <dev-portage>
Severity: critical CC: ingmar, notify
Priority: High Keywords: InVCS, REGRESSION
Version: unspecified   
Hardware: x86   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 181949    
Attachments: fix UnboundLocalError: local variable 'mymtime' (triggered by confmem)

Description Jonathan Callen (RETIRED) gentoo-dev 2007-06-09 08:50:30 UTC
After emerging portage-, portage dies during the merge phase

Reproducible: Always

Steps to Reproduce:
1. # emerge =sys-apps/portage-
2. # emerge =sys-apps/portage-

Actual Results:  
Died with traceback (see below)

Expected Results:  
correctly emerged portage

# emerge -avt1 portage

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

Calculating dependencies... done!
[ebuild   R   ] sys-apps/portage-  USE="-build -doc -epydoc (-selinux)" LINGUAS="-pl" 0 kB 

Total: 1 package (1 reinstall), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] 
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) sys-apps/portage- to /
 * portage-2.1.2.tar.bz2 RMD160 ;-) ...                                   [ ok ]
 * portage-2.1.2.tar.bz2 SHA1 ;-) ...                                     [ ok ]
 * portage-2.1.2.tar.bz2 SHA256 ;-) ...                                   [ ok ]
 * portage-2.1.2.tar.bz2 size ;-) ...                                     [ ok ]
 * portage- RMD160 ;-) ...                              [ ok ]
 * portage- SHA1 ;-) ...                                [ ok ]
 * portage- SHA256 ;-) ...                              [ ok ]
 * portage- size ;-) ...                                [ ok ]
 * checking ebuild checksums ;-) ...                                      [ ok ]
 * checking auxfile checksums ;-) ...                                     [ ok ]
 * checking miscfile checksums ;-) ...                                    [ ok ]
 * checking portage-2.1.2.tar.bz2 ;-) ...                                 [ ok ]
 * checking portage- ;-) ...                            [ ok ]
>>> Unpacking source...
>>> Unpacking portage-2.1.2.tar.bz2 to /var/tmp/portage/sys-apps/portage-
>>> Unpacking portage- to /var/tmp/portage/sys-apps/portage-
 * Applying portage- ...                                    [ ok ]
 * Setting portage.VERSION to ...                                [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/sys-apps/portage- ...
>>> Source compiled.
>>> Test phase [not enabled]: sys-apps/portage-

>>> Install portage- into /var/tmp/portage/sys-apps/portage- category sys-apps
patching file make.conf
>>> Completed installing portage- into /var/tmp/portage/sys-apps/portage-

ecompressdir: bzip2 -9 usr/share/man
strip: i686-pc-linux-gnu-strip --strip-unneeded
>>> Merging sys-apps/portage- to /
--- /etc/
Traceback (most recent call last):
  File "/usr/bin/emerge", line 5567, in ?
    retval = emerge_main()
  File "/usr/bin/emerge", line 5562, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/bin/emerge", line 5029, in action_build
    retval = mergetask.merge(pkglist, favorites, mtimedb)
  File "/usr/bin/emerge", line 3185, in merge
  File "/usr/lib/portage/pym/", line 3790, in doebuild
    vartree=vartree, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/", line 4000, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/", line 7877, in merge
    cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/", line 7519, in treewalk
    if self.mergeme(srcroot,destroot,outfile,secondhand,"",cfgfiledict,mymtime):
  File "/usr/lib/portage/pym/", line 7797, in mergeme
    join(offset, x), cfgfiledict, thismtime):
  File "/usr/lib/portage/pym/", line 7853, in mergeme
    if mymtime!=None:
UnboundLocalError: local variable 'mymtime' referenced before assignment

# emerge --info
Portage (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.5-r3, 2.6.21-gentoo-r2 i686)
System uname: 2.6.20-15-generic i686 unknown
Gentoo Base System release 2.0.0_alpha3
Timestamp of tree: Sat, 09 Jun 2007 06:50:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-java/java-config: 1.3.7, 2.0.33
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
CFLAGS="-Os -march=pentium4 -mtune=prescott -pipe"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-Os -march=pentium4 -mtune=prescott -pipe"
FEATURES="distlocks metadata-transfer sandbox sfperms strict userfetch userpriv usersandbox"
LINGUAS="en en_AU en_CA en_IE en_GB en_NZ en_US en@quot en@boldquot"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-* --prune-empty-dirs"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/overlays/gcj-overlay /usr/local/overlays/java-overlay"
USE="X a52 aac acl acpi alsa ao arts artswrappersuid bash-completion berkdb bitmap-fonts branding bzip2 cairo caps cdr cjk cli cracklib cups dbus dga dri dvd dvdr dvdread eds emboss encode esd evo fam fbcon flac fontconfig foomaticdb fuse gcj gdbm gif gnutls gpm graphviz gs gtk hal iconv idn imagemagick insecure-savers ipv6 isdnlog ithreads java javascript jpeg jpeg2k justify kde kdehiddenvisibility kerberos kqemu libg++ logrotate lua mad mbox midi mikmod mmx mng mp3 mpeg mudflap music ncurses nls no-old-linux nptl nptlonly nsplugin ogg opengl openmp pam pango pcre pdf perl perlsuid png ppds pppd python qt3 qt3support quicktime readline real reflection rle ruby samba scanner sdl session spell spl sse sse2 ssl suid svg sysfs tcl tcpd theora tiff tk truetype truetype-fonts type1-fonts unicode usb utempter v4l vim-pager vim-syntax vorbis wavpack win32codecs wmf x86 xattr xcomposite xine xinerama xml xorg xpm xscreensaver xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_AU en_CA en_IE en_GB en_NZ en_US en@quot en@boldquot" USERLAND="GNU" VIDEO_CARDS="ati fglrx radeon vesa"
Comment 1 Zac Medico gentoo-dev 2007-06-09 11:03:55 UTC
Created attachment 121564 [details, diff]
fix UnboundLocalError: local variable 'mymtime' (triggered by confmem)

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

patch /usr/lib/portage/pym/ < /tmp/mymtime.patch
Comment 2 Zac Medico gentoo-dev 2007-06-15 03:24:46 UTC
This has been released in 2.1.3_rc1.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-06-17 15:56:13 UTC
*** Bug 182341 has been marked as a duplicate of this bug. ***