Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 5813 - Portage and ${ROOT}
Summary: Portage and ${ROOT}
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Daniel Robbins (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-31 07:13 UTC by Nicholas Jones (RETIRED)
Modified: 2011-10-30 22:20 UTC (History)
2 users (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 Nicholas Jones (RETIRED) gentoo-dev 2002-07-31 07:13:30 UTC
Gerk pointed out a problem he was having with portage and a set $root
where the merge would simply fail when it says ">>> merging"

I ran through the code looking for a clue... I ran across a couple things
that confused me a bit. There are references to variables in functions like
dblink::treewalk that use variables that don't seem to be defined. Other
variables are present and would seem to be right. Differences being 'root'
being used and not obviously defined. It isn't a class global that I noticed,
and it would seem that 'destroot' would be better. Also didn't see any global
labels on it.

I'm not to versed on that section of the code, so I didn't look into it too
deeply, but that's what I saw on my perusal.
Comment 1 Mark Guertin 2002-07-31 09:57:58 UTC
Here's a simple way of recreating:

mkdir -p /tmp/test ; export ROOT="/tmp/test" ; emerge baselayout
>>> /tmp/test/tmp doesn't exist, creating it...
>>> /tmp/test/var/tmp doesn't exist, creating it...
Calculating dependencies ...done!
>>> emerge sys-apps/baselayout-1.8.0 to /tmp/test/
>>> Downloading
http://www.ibiblio.org/pub/Linux/distributions/gentoo/distfiles/sysvinit-2.84.tar.gz
--10:38:17-- 
http://www.ibiblio.org/pub/Linux/distributions/gentoo/distfiles/sysvinit-2.84.tar.gz
           => `/usr/portage/distfiles/sysvinit-2.84.tar.gz'
Resolving www.ibiblio.org... done.
Connecting to www.ibiblio.org[152.2.210.81]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 91,488 [application/x-tar]

100%[=========================================================>] 91,488       
80.93K/s    ETA 00:00

10:38:19 (80.93 KB/s) - `/usr/portage/distfiles/sysvinit-2.84.tar.gz' saved
[91488/91488]

>>> md5 ;-) sysvinit-2.84.tar.gz
>>> Unpacking source...
>>> Unpacking sysvinit-2.84.tar.gz
>>> Unpacking rc-scripts-1.3.7.tar.bz2
>>> Source unpacked.
cc -c -Wall -march=i686 -O3 -pipe -D_GNU_SOURCE init.c
cc -c -Wall -march=i686 -O3 -pipe -D_GNU_SOURCE -DINIT_MAIN utmp.c -o init_utmp.o
cc -Wall -march=i686 -O3 -pipe -D_GNU_SOURCE   -c -o halt.o halt.c
cc -Wall -march=i686 -O3 -pipe -D_GNU_SOURCE   -c -o ifdown.o ifdown.c
cc -Wall -march=i686 -O3 -pipe -D_GNU_SOURCE   -c -o hddown.o hddown.c
cc -c -Wall -march=i686 -O3 -pipe -D_GNU_SOURCE utmp.c
cc -Wall -march=i686 -O3 -pipe -D_GNU_SOURCE   -c -o dowall.o dowall.c
cc -Wall -march=i686 -O3 -pipe -D_GNU_SOURCE   -c -o shutdown.o shutdown.c
cc -Wall -march=i686 -O3 -pipe -D_GNU_SOURCE    killall5.c   -o killall5
cc -Wall -march=i686 -O3 -pipe -D_GNU_SOURCE   -c -o runlevel.o runlevel.c
cc -Wall -march=i686 -O3 -pipe -D_GNU_SOURCE   -c -o sulogin.o sulogin.c
cc -Wall -march=i686 -O3 -pipe -D_GNU_SOURCE   -c -o utmpdump.o utmpdump.c
cc -Wall -march=i686 -O3 -pipe -D_GNU_SOURCE   -c -o last.o last.c
cc -Wall -march=i686 -O3 -pipe -D_GNU_SOURCE   -c -o mesg.o mesg.c
cc -Wall -march=i686 -O3 -pipe -D_GNU_SOURCE   -c -o wall.o wall.c
cc   -o init init.o init_utmp.o
cc  -o halt halt.o ifdown.o hddown.o utmp.o
cc  -o shutdown dowall.o shutdown.o utmp.o
cc  -o runlevel runlevel.o
cc   -o sulogin sulogin.o -lcrypt
cc  -o utmpdump utmpdump.o
cc  -o last last.o
cc  -o mesg mesg.o
cc  -o wall dowall.o wall.o

>>> Install baselayout-1.8.0 into /var/tmp/portage/baselayout-1.8.0/image/
category sys-apps
info:
strip:
/var/tmp/portage/baselayout-1.8.0/image/sbin/runscript
/var/tmp/portage/baselayout-1.8.0/image/sbin/start-stop-daemon
/var/tmp/portage/baselayout-1.8.0/image/sbin/init
/var/tmp/portage/baselayout-1.8.0/image/sbin/halt
/var/tmp/portage/baselayout-1.8.0/image/sbin/killall5
/var/tmp/portage/baselayout-1.8.0/image/sbin/runlevel
/var/tmp/portage/baselayout-1.8.0/image/sbin/shutdown
/var/tmp/portage/baselayout-1.8.0/image/sbin/sulogin
/var/tmp/portage/baselayout-1.8.0/image/bin/last
/var/tmp/portage/baselayout-1.8.0/image/bin/mesg
/var/tmp/portage/baselayout-1.8.0/image/bin/utmpdump
/var/tmp/portage/baselayout-1.8.0/image/bin/wall
>>> Completed installing into /var/tmp/portage/baselayout-1.8.0/image/

>>> Merging sys-apps/baselayout-1.8.0 to /tmp/test/
Traceback (most recent call last):
  File "/usr/bin/emerge", line 1428, in ?
    mydepgraph.merge(mydepgraph.altlist())
  File "/usr/bin/emerge", line 955, in merge
    retval=portage.doebuild(y,"merge",myroot,edebug)
  File "/usr/lib/python2.2/site-packages/portage.py", line 1156, in doebuild
    return
merge(settings["CATEGORY"],settings["PF"],settings["D"],settings["BUILDDIR"]+"/build-info",myroot,myebuild=settings["EBUILD"])
  File "/usr/lib/python2.2/site-packages/portage.py", line 1381, in merge
    mylink.merge(pkgloc,infloc,myroot,myebuild)
  File "/usr/lib/python2.2/site-packages/portage.py", line 3679, in merge
    self.treewalk(mergeroot,myroot,inforoot,myebuild)
  File "/usr/lib/python2.2/site-packages/portage.py", line 3368, in treewalk
    counter=db[destroot]["vartree"].dbapi.counter_tick()
  File "/usr/lib/python2.2/site-packages/portage.py", line 2410, in counter_tick
    return counter_tick_core(self.root)
  File "/usr/lib/python2.2/site-packages/portage.py", line 2386, in
counter_tick_core
    newcfile=open(newcpath,"w")
IOError: [Errno 2] No such file or directory: '/tmp/test/var/cache/edb/counter.new'
Comment 2 Mark Guertin 2002-07-31 10:00:51 UTC
Also noticed one other thing in .21 release, not sure if its proper behaviour or
not... but it seems that after you have sepcified a ROOT, ebuild.sh was looking
for some helper acripts it uses in ${ROOT}/sbin/ instead of just /sbin

I don't have steps to recreate this one, but in fighting with some things
yesterday saw this going by in logs (which have since been deleted, doh!)
Comment 3 Mark Guertin 2002-07-31 12:21:11 UTC
portage gets depreciated too fast to test anything at this point.  I'll leave it
up to other people to figure out as I dont have days to waste on things like
this, I suggest we setup a _real_ testing process for portage, as it is the key
to Gentoo
Comment 4 Daniel Robbins (RETIRED) gentoo-dev 2002-08-01 01:35:04 UTC
Gerk, the rant portions of your last comment were out of line.  Please keep that
stuff off our bug tracker.  Yes, it'd be nice if someone would write a formal
test suite for Portage.  Lots of people have suggested it but no one has cared
enough about it to actually assist me in creating one.  Ideas are a dime a dozen
around here.

This bug will be fixed in Portage 2.0.23.
Comment 5 Mark Guertin 2002-08-01 08:26:02 UTC
Sorry Daniel, you are right.  I will keep rants off of the bug tracker.  
Thanks for fixing up. 
Comment 6 Kevyn Shortell (RETIRED) gentoo-dev 2002-08-01 19:13:00 UTC
Re-opening bug for tracking purposes to verify after portage .23 is available
Bugs should not be closed until verified by submitter.
Comment 7 Mark Guertin 2002-08-02 15:36:44 UTC
This bug is now verified fixed with the .23 release, thanks Daniel.