Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 22722 - emerge -pu "crashes" when ROOT is set to something
Summary: emerge -pu "crashes" when ROOT is set to something
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-12 20:19 UTC by Georgi Georgiev
Modified: 2011-10-30 22:20 UTC (History)
1 user (show)

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 Georgi Georgiev 2003-06-12 20:19:56 UTC
Situation: I am trying to see what I have to update on my laptop. The laptop is
a P200MMX, and I therefore mount its root over NFS and use my desktop PC to
build stuff.

Problem: Running "ROOT=/remote/mouse emerge -pu baselayout" gives the following
error:

chutz@lion chutz $ ROOT=/remote/mouse/ emerge -pu baselayout

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild    U ] sys-libs/glibc-2.3.1-r4 [2.3.1-r2] 
Traceback (most recent call last):
  File "/usr/bin/emerge", line 1924, in ?
    mydepgraph.display(mydepgraph.altlist())
  File "/usr/bin/emerge", line 961, in display
    if (myoldslot==mynewslot) and portage.pkgcmp(portage.pkgsplit(x[2]),
portage.pkgsplit(myoldbest)) < 0:
  File "/usr/lib/python2.2/site-packages/portage.py", line 2153, in pkgcmp
    r1=string.atoi(pkg1[2][1:])
  File "/usr/lib/python2.2/string.py", line 220, in atoi
    return _int(s, base)
ValueError: invalid literal for int(): r4

I tried to debug deeper into the problem and changed /usr/bin/emerge like this:

--- emerge      2003-06-13 12:04:27.000000000 +0900
+++ emerge.chutz        2003-06-13 12:03:26.000000000 +0900
@@ -956,6 +956,7 @@
                                        except:
                                                myoldslot=None
                                       
mynewslot=portage.portdb.aux_get(x[2],["SLOT"])[0]
+                                       print "working on", x,":
pkgsplit(",x[2],") = ", portage.pkgsplit(x[2]);
 
                                        if (myoldslot==mynewslot) and
portage.pkgcmp(portage.pkgsplit(x[2]), portage.pkgsplit(myoldbest)) < 0:
                                                addl="   "+turquoise("U")+blue("D")

I then got output similar to the previous, but:

Calculating dependencies ...done!
working on ['ebuild', '/', 'sys-libs/glibc-2.3.1-r4', 'merge'] : pkgsplit(
sys-libs/glibc-2.3.1-r4 ) =  ['sys-libs/glibc', '2.3.1', 'r4']
[ebuild    U ] sys-libs/glibc-2.3.1-r4 [2.3.1-r2] 
working on ['ebuild', '/remote/mouse/', 'sys-libs/glibc-2.3.1-r4', 'merge'] :
pkgsplit( sys-libs/glibc-2.3.1-r4 ) =  ['sys-libs/glibc', '2.3.1', '-r4']

This error is not observed when I try to "emerge -p glibc", but "emerge -u
glibc" is even more interesting:

 Calculating dependencies ...done!
working on ['ebuild', '/', 'sys-libs/glibc-2.3.1-r4', 'merge'] : pkgsplit(
sys-libs/glibc-2.3.1-r4 ) =  ['sys-libs/glibc', '2.3.1', 'r4']
[ebuild    U ] sys-libs/glibc-2.3.1-r4 [2.3.1-r2] 
working on ['ebuild', '/remote/mouse/', 'sys-apps/gawk-3.1.1-r2', 'merge'] :
pkgsplit( sys-apps/gawk-3.1.1-r2 ) =  ['sys-apps/gawk', '3.1.1', 'r2']
[ebuild    U ] sys-apps/gawk-3.1.1-r2 [3.1.1-r1] to /remote/mouse/ 
working on ['ebuild', '/remote/mouse/', 'sys-apps/baselayout-1.8.5.9', 'merge']
: pkgsplit( sys-apps/baselayout-1.8.5.9 ) =  ['sys-apps/baselayout', '1.8.5.9',
'r0']
[ebuild    U ] sys-apps/baselayout-1.8.5.9 [1.8.5.8] to /remote/mouse/ 
working on ['ebuild', '/remote/mouse/', 'sys-libs/glibc-2.3.1-r4', 'merge'] :
pkgsplit( sys-libs/glibc-2.3.1-r4 ) =  ['sys-libs/glibc', '2.3.1', '-r4']
Traceback (most recent call last):
.... and the well-known error goes here.

My /etc/make.conf is symlinked to /remote/mouse/etc/make.conf for the time when
ROOT=/remote/mouse.

Here is my "emerge info", even though I don't think it's necessary:

Portage 2.0.48-r1 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r2)
=================================================================
System uname: 2.4.20-x5 i686 AMD Athlon(TM) XP 1800+
GENTOO_MIRRORS=" ftp://ftp.gg3.net/pub/linux/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/var/portage"
DISTDIR="/var/portage-distfiles"
PKGDIR="/var/portage-lo/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/var/portage-mine"
USE="jpeg png gdbm aalib -acl -afs -alsa -apache2 apm -arts -atlas avi berkdb
-bonobo canna -cdr cjk crypt -cups dga directfb -doc -dvd -encode esd -evo -ev6
fbcon -flash -freewnn -gb -gd -ggz -ggi -gif -gnome -gphoto2 gpm -gps -gtk2 -gtk
-gtkhtml -guile -icc -icc-pgo imap imlib -innodb -ipv6 -java -jikes -junit -kde
-kerberos -lcms -ldap -leim -libg++ -libdga libwww -matrox maildir mbox -mikmod
mmx -motif -mozilla -mpeg mule -mysql -nas ncurses nls -nocardbus -oav -oci8
-odbc -oggvorbis -opengl oss pam pcmcia -pda -pdflib perl pic -plotutils pnp
-postgres python -qt -qtmt -quicktime readline -ruby -samba sasl -scanner sdl
slang -slp -snmp -socks5 -spell -sse ssl -static svga -tcltk tcpd -tetex
truetype trusted -voodoo3 -wavelan -X -xface xml xml2 -xmms xv zlib x86 -3dnow
moznoirc moznomail moznocompose"
COMPILER="gcc3"
CHOST="i586-pc-linux-gnu"
CFLAGS="-march=pentium-mmx -mcpu=pentium-mmx -Os -pipe"
CXXFLAGS="-march=pentium-mmx -mcpu=pentium-mmx -Os -pipe"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gg3.net/gentoo-portage"
FEATURES="sandbox ccache"
Comment 1 Georgi Georgiev 2003-06-12 20:27:15 UTC
I am sorry for the wrapped lines. I don't know what browser it is best to use so that this doesn't happen, but until I figure this out, I posted the output here:

http://gg3.net/~chutz/bug22722.txt
Comment 2 Georgi Georgiev 2003-06-12 21:02:49 UTC
A workaround: the bug disappeared once I updated the problematic package on the host machine. I.e. I upgraded to glibc-2.3.1-r4 and now I have no problems doing "ROOT=/remote/mouse emerge -pvuU baselayout", and getting the expected output:

Calculating dependencies ...done!
[ebuild    U ] sys-libs/glibc-2.3.1-r4 [2.3.1-r2] to /remote/mouse/ 
[ebuild    U ] sys-apps/gawk-3.1.1-r2 [3.1.1-r1] to /remote/mouse/ 
[ebuild    U ] sys-apps/baselayout-1.8.5.9 [1.8.5.8] to /remote/mouse

The bug is still a bug though....
Comment 3 Charles Goodwin 2003-12-13 16:40:25 UTC
Since later versions of portage fix this... please comment if you think it's still an issue.