Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 132442 - portage behave badly with "ROOT=" env var set
Summary: portage behave badly with "ROOT=" env var set
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 115839
  Show dependency tree
 
Reported: 2006-05-06 05:12 UTC by Francesco R. (RETIRED)
Modified: 2006-05-07 23:09 UTC (History)
0 users

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 Francesco R. (RETIRED) gentoo-dev 2006-05-06 05:12:32 UTC
portage behave badly with "ROOT=" env var set
syntomps:

emerge cat/pkg digest 
create {var,tmp} directoryes in cwd

emerge cat/pkg digest &> .somefile
goes into an infinite loop
Comment 1 Francesco R. (RETIRED) gentoo-dev 2006-05-06 05:13:11 UTC
emerge --info
Portage 2.1_pre10-r3 (default-linux/x86/2006.0, gcc-4.1.0, glibc-2.3.6-r2, 2.6.17-rc3-mm1 i686)
=================================================================
System uname: 2.6.17-rc3-mm1 i686 AMD Athlon(tm)
Gentoo Base System version 1.12.0_pre19
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [disabled]
dev-lang/python:     2.3.5-r2, 2.4.2
dev-util/ccache:     2.3
dev-util/confcache:  0.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.91.0.5
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/env.d"
CXXFLAGS="-Os -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig cvs distcc distlocks notitles prelink sandbox sfperms sign strict userpriv usersandbox"
GENTOO_MIRRORS="http://db.pnpitalia.it/ http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,-Bdirect -Wl,--as-needed -Wl,-hashvals -Wl,-zdynsort"
LINGUAS="it"
MAKEOPTS="-j12"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/OVERLAYS/bdirect /OVERLAYS/virtual /OVERLAYS/oo /OVERLAYS/gentoo-java-experimental /home/user/svn/gentoo-mysql-overlay/experimental /OVERLAYS/paludis"
SYNC="rsync://db.pnpitalia.it/gentoo-portage"
USE="x86 3dnow X alsa apache2 apm avi bash-completion berkdb bitmap-fonts browserplugin bzip2 cairo cjk crypt cups curl dri eds emboss encode engines erandom exif fam firefox foomaticdb gdbm gif gnome gpm gstreamer gtk gtk2 idn imlib ipv6 java jpeg jpeg2k kde kdeenablefinal libg++ libwww mad mikmod mmx mng motif mp3 mpeg mysql ncurses nls nptl odbc ogg openexr opengl oss pam pdflib perl plugins png python qt quicktime readline samba sasl screen sdl server slang spell sse ssl tcltk tiff truetype truetype-fonts udev unicode urandom usb utils vorbis xine xinerama xml xmms xprint xv zeroconf elibc_glibc input_devices_evdev kernel_linux linguas_it userland_GNU video_cards_none video_cards_nvidia"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL

Comment 2 Marius Mauch (RETIRED) gentoo-dev 2006-05-06 05:14:30 UTC
Ehm, you might want to explain a "little" bit more.
Comment 3 Francesco R. (RETIRED) gentoo-dev 2006-05-06 10:47:04 UTC
ok, the command in question sure is not "emerge" but "ebuild". 

fex:
ROOT="" ebuild mysql-5.1.7_beta.ebuild digest && rm -rf {tmp,var}

instead, upgrading to 2.1_pre10-r3 fixed the problem regarding the "infinite loop", it was a "stat()" on a non existant directory reiterated with a "/" added every time the stat was issued.

So the biggest problem is fixed however what about to filter stupid values of ROOT var?
Comment 4 Zac Medico gentoo-dev 2006-05-06 10:50:54 UTC
(In reply to comment #3)
> So the biggest problem is fixed however what about to filter stupid values of
> ROOT var?

Sure, I'll fix that.  I was able to reproduce with `ROOT="" emerge moo`.

Comment 5 Zac Medico gentoo-dev 2006-05-06 11:38:11 UTC
Fixed in svn r3326.
Comment 6 Zac Medico gentoo-dev 2006-05-07 23:09:41 UTC
This has been release in 2.1_pre10-r4.