Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 124203 - Portage-2.1* removes /distdir
Summary: Portage-2.1* removes /distdir
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: REGRESSION
Depends on:
Blocks: 115839
  Show dependency tree
 
Reported: 2006-02-26 14:02 UTC by Martin Väth
Modified: 2006-03-01 20:15 UTC (History)
0 users

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


Attachments
existing clean phase ported from bash to python (doebuild-clean-python.patch,3.16 KB, patch)
2006-02-27 19:19 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Väth 2006-02-26 14:02:57 UTC
During update portage-2.0.54 -> 2.1_pre4/2.1_pre5, the directory /distdir is completely removed with all its content and without any warning (yes, I really mean "/distdir" as the full path, i.e. in the root directory).

When watching in another shell during emerge, I saw that the directory was still there when regenerating /etc/ld.so.cache, but it was missing after the following output was complete:

>>> Regenerating /etc/ld.so.cache...
>>> sys-apps/portage-2.1_pre5 merged.
find: invalid predicate `'
rmdir: `': No such file or directory

The above two lines are also strange, although it is not clear whether they are related to the bug.
Tested on x86 and amd64. The following emerge --info is from the amd64:

Gentoo Base System version 1.6.14

Portage 2.1_pre5 (!/gentoo64/usr/portage/profiles/default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2.6.14-mv-r5 x86_64)
=================================================================
System uname: 2.6.14-mv-r5 x86_64 AMD Athlon(tm) 64 Processor 3000+
ccache version 2.3 [enabled]
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
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.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE=""
ARCH="amd64"
AUTOCLEAN="yes"
BASH_ENV="/etc/spork/is/not/valid/profile.env"
CBUILD="x86_64-pc-linux-gnu"
CDEFINE_amd64="__x86_64__"
CDEFINE_x86="__i386__"
CFLAGS="-fPIC -march=athlon64 -O2 -pipe"
CFLAGS_x86="-m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x86="i686-pc-linux-gnu"
CLEAN_DELAY="5"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-fPIC -march=athlon64 -O2 -pipe"
DEFAULT_ABI="amd64"
DISTDIR="/gentoo64/distdir.mv/distfiles"
ELIBC="glibc"
EMERGE_DEFAULT_OPTS="--verbose"
EMERGE_WARNING_DELAY="10"
EXTRA_ECONF="--enable-new-ldflags --enable-new_ldflags"
FEATURES="autoconfig ccache collision-protect confcache distlocks parallel-fetch sandbox sfperms strict userpriv usersandbox"
FETCHCOMMAND="/home/gentoo/various/scripts/trickyfetch ${URI} ${DISTDIR} ${FILE}"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/"
KERNEL="linux"
LDFLAGS="-Wl,-z,combreloc -Wl,--sort-common -Wl,--relax -Wl,-O1 -Wl,-z,now"
LDFLAGS_x86="-m elf_i386 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib"
LIBDIR_amd64="lib64"
LIBDIR_x86="lib32"
LINGUAS="en de ru"
MAKEOPTS="-j2"
MULTILIB_ABIS="x86 amd64"
MULTILIB_STRICT_DENY="64-bit.*shared object"
MULTILIB_STRICT_DIRS="/lib /usr/lib /usr/kde/*/lib /usr/qt/*/lib /usr/X11R6/lib"
MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|eclipse-3|debug|portage)"
OPTFLAGS="-O3 -O4 -fomit-frame-pointer -funswitch-loops -funroll-all-loops -fpeel-loops -ftracer"
PKGDIR="/space/gentoo/x86_64"
PORTAGE_ARCHLIST="ppc s390 amd64 ppc64 m68k arm sparc sh mips ia64 alpha ppc-macos hppa x86"
PORTAGE_BINHOST_CHUNKSIZE="3000"
PORTAGE_CALLER="emerge"
PORTAGE_ELOG_CLASSES="info warn error log"
PORTAGE_ELOG_SYSTEM="save"
PORTAGE_GID="250"
PORTAGE_MASTER_PID="12271"
PORTAGE_NICENESS="9"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/gentoo64/usr/local/overlays/portage.de /home/gentoo/various/portage"
PORT_ENOTICE_DIR="/var/log/notices"
PORT_LOGDIR="/var/log/portage"
PRELINK_PATH=""
PRELINK_PATH_MASK=""
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P ${DISTDIR} ${URI}"
RPMDIR="/usr/portage/rpm"
RSYNC_EXCLUDEFROM="/home/gentoo/various/etc/portage/rsync_excludes"
RSYNC_RETRIES="3"
RSYNC_TIMEOUT="180"
SYMLINK_LIB="yes"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="amd64 16bit 64bit 7zip S3TC X a52 aac aalib acpi adsl akode alsa amarok aotuv apache2 arts asf async athena atlas auctex audiofile ax25 bash-completion bcmath berkdb bigpatch bindist bitmap-fonts bittorrent bl blas browserplugin bzip2 cap caps ccache cdda cdio cdparanoia cdr cdrom cg chasen checkpath chipcard clvm config_wizard crypt crypto_openssl css curl curlwrappers custom-cflags cvs dga dio discard-path dnd double-precision dpms dri dtaus dts dv dvd dvdr dvdread dynamic ecc edl emacs emul-linux-x86 encode escreen esd eurofile exif exscalibar extrafilters extras fam fame fat fbcon fbsplash festival ffmpeg fix-connected-rt flac fmod fortran gatos gd gdbm geldkarte gencertdaily gif gimp ginac gkrellm glade glgd glibc-compat20 glibc-omitfp glitz glut glx gmail gmailtimestamps gmp gmtsuppl gmttria gpm grammar gs gsm gtk gtk2 gzip hardenedphp hbci hddtemp ibam id3 idea ieee1394 ilbc image imagemagick imap imlib imlib2 infopipe input_devices_keyboard input_devices_mouse irda jack java java-external jbig jce jp2 jpeg jpeg2k kde kdeenablefinal lame latex libsamplerate libtommath libwww lirc live login-watch logitech-mouse logrotate lzo lzw mad math matroska maya-shaderlibrary mbox md5sum mikmod mime mimencode mixer mjpeg mng mod mode-force mode-paranoid modplug motif mounts-check mozilla moznocompose moznoirc moznoxft mp3 mp4live mpeg mpeg2 mplayer mschap mupad-noscilab musepack music musicbrainz mythtv nas ncurses nforce2 ngui nls no-old-linux no_wxgtk1 noamazon nocardbus nocd noflagstrip nolvm1 nolvmstatic nomirrors nosnapshots nowin nvidia octave offensive ogg oggvorbis ogre on-the-fly-crypt openal openexr opengl opera oss pcntl pcre pdflib perl pic player plib plotutils png pnp pop portaudio posix preview-latex print python qt quicktime rar rc5 readline real realms recode reiser4 reiserfs remix rle rogue scp screen sdl setup-plugin sid skins slang smime sndfile sou sox speex spell sse-filters ssl stats stlport stream subp subtitles suidcheck symlink sysfs szip tabs tagwriting tcltk tcpmd5 tetex themes theora thesaurus thumbnail tiff timidity tomsfastmath transcode udev unicode usb userfiles userlocales utf8 uudeview v4l v4l2 vcd vcdimager video_cards_nv video_cards_nvidia video_cards_v4l videos vlm voice vorbis wma wmf wordperfect wxwindows x264 xanim xatrix xchat xchattext xcomposite xext xgetdefault xine xlockrc xml2 xmms xosd xpm xrandr xscreensaver xv xvid xvmc yaepg yv12 zip zlib zvbi elibc_glibc kernel_linux linguas_en linguas_de linguas_ru userland_GNU"
USERLAND="GNU"
USE_EXPAND="DVB_CARDS ELIBC FCDSL_CARDS FRITZCAPI_CARDS INPUT_DEVICES KERNEL LINGUAS USERLAND VIDEO_CARDS"
USE_EXPAND_HIDDEN=""
USE_ORDER="env:pkg:conf:defaults"
XARGS="xargs -r"
Comment 1 Zac Medico gentoo-dev 2006-02-26 14:29:23 UTC
This seems to be caused by `rm -rf "${PORTAGE_BUILDDIR}/distdir"` inside ebuild.sh.  Needs a sanity check...
Comment 2 Zac Medico gentoo-dev 2006-02-27 16:29:57 UTC
I've added a sanity check in dyn_clean() to make sure that PORTAGE_BUILDDIR is not zero length (svn r2800).  It seems that PORTAGE_BUILDDIR was unset because portage-2.0.54 (which doesn't set PORTAGE_BUILDDIR) was using the newly installed ebuild.sh from portage-2.1_pre5.
Comment 3 Martin Väth 2006-02-27 17:03:04 UTC
Thanks. This sounds reasonable and also decreases the danger that something else is going to havoc if something is fooling around with the environment.
Comment 4 Zac Medico gentoo-dev 2006-02-27 19:19:42 UTC
Created attachment 80877 [details, diff]
existing clean phase ported from bash to python

IOM ebuild.sh really should only handle ebuild execution rather than random shell tasks.  There's no need for the clean phase to be inside ebuild.sh.
Comment 5 Zac Medico gentoo-dev 2006-03-01 20:15:18 UTC
I have released the sanity check in 2.1_pre5-r2.