Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 12638 - scripts/bootstrap doesn't work with wrong tempdir
Summary: scripts/bootstrap doesn't work with wrong tempdir
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 All
: High normal (vote)
Assignee: Sven Vermeulen (RETIRED)
URL:
Whiteboard:
Keywords:
: 16956 18701 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-12-23 15:19 UTC by Holger Schurig
Modified: 2011-10-30 22:21 UTC (History)
4 users (show)

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


Attachments
Patch to set "env -i chroot" (gentoo-x86-install.diff-env-i,505 bytes, patch)
2003-09-11 07:36 UTC, Sven Vermeulen (RETIRED)
Details | Diff
Wrong document (altinstall.diff-fix_env_i,1.09 KB, patch)
2003-09-12 02:34 UTC, Sven Vermeulen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Schurig 2002-12-23 15:19:46 UTC
I have a running Mandrake 8.2 system. I downloaded the stage 1, extracted it 
and chrooted into it. When I later called scripts/bootstrap, the system was 
compiling some things (e.g. basesystem and binutils). When it came to the 
compilation of gcc-3.2 it stopped, saying that it could not access 
/root/tmp/po<somefiles>. 
 
Somehow patch wanted to access this. 
 
I found out using   set | grep /root/tmp  that some environment vars are pointing to 
this - after the chroot - no longer existing directory. After I manually changed this 
to /var/tmp, the bootstrap process worked without a hitch. 
 
Suggestion: set TMP, TEMP and TMPDIR to PORTAGE_TMPDIR
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2002-12-24 04:17:26 UTC
Can we just flush the environment?
Or make that a note in the install docs?

If they have env...
env -i chroot /mnt/gentoo /bin/bash

Can't just flush the env when inside the chroot.
Perhaps an optional script to source?
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-24 17:02:10 UTC
Nick, check in ebuild.sh .. I did add a fix for this some time back, but did
not for TEMP.  TMP and TMPDIR are covered though.  It is in the dyn_compile()
and dyn_install() functions.  I do not know if we wat to make it more global ...
Comment 3 Holger Schurig 2002-12-25 12:21:19 UTC
I personally like the idea to change the installation documentation to use "env -i" ... 
you can never know what envvars are set that would harm the bootstrap or other 
emerge stuff. 
 
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-27 16:21:47 UTC
Nick, should I fix this on CVS?  Is portage CVS up to date ?  Do we fix it
another way ?
Comment 5 Martin Holzer (RETIRED) gentoo-dev 2003-03-07 19:31:00 UTC
*** Bug 16956 has been marked as a duplicate of this bug. ***
Comment 6 Martin Holzer (RETIRED) gentoo-dev 2003-04-03 13:50:51 UTC
*** Bug 18701 has been marked as a duplicate of this bug. ***
Comment 7 Sven Vermeulen (RETIRED) gentoo-dev 2003-09-10 01:21:44 UTC
Isn't env available on all systems? If so, I could just change the installation guide to read "env -i chroot /mnt/gentoo /bin/bash" instead of writing a note that people with env should use this and those without use that...
Comment 8 Daniel Robbins (RETIRED) gentoo-dev 2003-09-10 13:21:40 UTC
Sven, I would expect this to work 100%.
Comment 9 Sven Vermeulen (RETIRED) gentoo-dev 2003-09-10 15:57:56 UTC
K, I'll handle this first thing tomorrow.
Comment 10 Sven Vermeulen (RETIRED) gentoo-dev 2003-09-11 07:36:45 UTC
Created attachment 17500 [details, diff]
Patch to set "env -i chroot"

If anyone can review
Comment 11 Sergey Kuleshov (RETIRED) gentoo-dev 2003-09-11 09:21:26 UTC
I guess env-update takes care of all vars, are you sure you didn't forget it?
Comment 12 Sven Vermeulen (RETIRED) gentoo-dev 2003-09-11 10:47:11 UTC
If azarah, carpaski and drobbins don't say that env-update takes care of this, then I'm rather confident that it doesn't :)
Comment 13 Sven Vermeulen (RETIRED) gentoo-dev 2003-09-12 02:34:54 UTC
Created attachment 17555 [details, diff]
Wrong document
Comment 14 Erwin (RETIRED) gentoo-dev 2003-09-12 02:38:55 UTC
patch looks good.
Comment 15 Sven Vermeulen (RETIRED) gentoo-dev 2003-09-14 07:02:03 UTC
committed