emerge (kernel)-sources works fine the first time, but the second time its run it deletes the sources it just installed. /var/tmp/portage/*-sources must be purged by hand before portage will work properly with them. Green src # emerge development-sources Calculating dependencies ...done! >>> emerge (1 of 1) sys-kernel/development-sources-2.6.2 to / keepwork >>> md5 src_uri ;-) linux-2.6.2.tar.bz2 >>> md5 src_uri ;-) linux-2.6.2-pax-openpax-20040204.tbz2 >>> md5 src_uri ;-) linux-2.6.1-binfmt-hpomnibook-20040203.tbz2 >>> Preparing to unpack... >>> Checking linux-2.6.2.tar.bz2's mtime... >>> Checking linux-2.6.2-pax-openpax-20040204.tbz2's mtime... >>> Checking linux-2.6.1-binfmt-hpomnibook-20040203.tbz2's mtime... >>> WORKDIR is up-to-date, keeping... >>> It appears that development-sources is already compiled; skipping. >>> (clean to force compilation) >>> Install development-sources-2.6.2 into /var/tmp/portage/development-sources-2.6.2/image/ category sys-kernel /usr/sbin/ebuild.sh: line 164: cd: /var/tmp/portage/development-sources-2.6.2/work/linux-2.6.2: No such file or directory >>> Copying sources... /usr/sbin/ebuild.sh: line 180: /var/tmp/portage/development-sources-2.6.2/work/linux-2.6.2/patches.txt: No such file or directory mv: cannot stat `/var/tmp/portage/development-sources-2.6.2/work/linux*': No such file or directory man: prepallstrip: strip: >>> Completed installing into /var/tmp/portage/development-sources-2.6.2/image/ >>> Merging sys-kernel/development-sources-2.6.2 to / --- /usr/ --- /usr/src/ >>> Safely unmerging already-installed instance... --- !empty dir /usr/src --- !empty dir /usr >>> original instance of package unmerged safely. * After installing a new kernel of any version, it is important * that you have the appropriate /etc/modules.autoload.d/kernel-X.Y * created (X.Y is the first 2 parts of your new kernel version) * For example, this kernel will require: * /etc/modules.autoload.d/kernel-2.6 * IMPORTANT: * ptyfs support has now been dropped from devfs and as a * result you are now required to compile this support into * the kernel. You can do so by enabling the following options * Device Drivers -> Character devices -> Unix98 PTY Support * File systems -> Pseudo filesystems -> /dev/pts filesystem. * Caching service dependencies... [ ok ]>>> sys-kernel/development-sources-2.6.2 merged. keepwork >>> clean: No packages selected for removal. >>> Auto-cleaning packages ... >>> No outdated packages were found on your system. * GNU info directory index is up-to-date. Green src #
you neglected to provide `emerge info`
Portage 2.0.50_pre21 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20040117-r1, 2.6.2) ================================================================= System uname: 2.6.2 i686 AMD Athlon(tm) processor Gentoo Base System version 1.4.3.12 distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] Autoconf: sys-devel/autoconf-2.59 Automake: sys-devel/automake-1.8.2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon -O2" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/cursors/xfree/default /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=athlon -O2" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache keepwork sandbox" GENTOO_MIRRORS="ftp://192.168.11.12/ ftp://192.168.11.12/distfiles/ http://mirrors.tds.net/gentoo ftp://gentoo.mirrors.pair.com/ http://gentoo.mirrors.pair.com/ http://mirror.tucdemonic.org/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://192.168.11.12/gentoo-portage" USE="X acpi acpi4linux alsa apm avi berkdb bonobo cap cdr clamav crypt cups curl dvd dvdr encode ethereal evo fbcon fbdev foomaticdb gd gd-external gdbm gif gnome gphoto2 gpm gtk gtk2 gtkhtml imagemagick imlib ipv6 java jpeg ldap libg++ libwww mad maildir md5sum mikmod motif mozilla mozinterfaceinfo moznoirc moznomail mozp3p mozsvg mpeg ncurses nls nptl oav oggvorbis opengl oss pam pdflib perl pic pie png python qt quicktime readline sasl scanner sdl slang spell sse ssl svga tcltk tcpd tetex tiff transcode truetype type1 usb x86 xine xinerama xml2 xmms xv zlib"
>>> emerge (1 of 1) sys-kernel/development-sources-2.6.2 to / keepwork This might be a slight bug... but it's induced by your use of keepwork.
Is there a setting to go along with keepwork that will make portage *not* try to be too smart and skip compiling just because the work directory exists? I like having the work directory left for me, but I'd much prefer the old functionality of always wiping and rebuilding automatically. Its a fatal issue for kernels, but somewhat of a nuisance (for me anyway) at other times. This problem here seems like it will only affect kernels as they are handled different from most ebuilds in that they are moved to the image directory instead of the typical copy... Perhaps if the kernel eclass deleted the work directory itself (its essentially empty anyway) after an install, so portage would know it must rebuild the work folder?
I agree with Scott. emerge should always delete workdir before emerge. I think keepwork means "don't delete after emerge" carpaski: what do you think?
If I wanted to cache compiled objects, I'd be using a mix of ccache and distcc... The check for WORKDIR up-to-date is rather an inconvenience, and seems more like it was intended to be used when directly calling "ebuild foo.ebuild install" rather than being triggered by portage. I'd prefer to see the default behavior revert to the old way of always purging the entire /var/tmp/portage/packagename directory before building. Or at least add a FEATURES="cleanwork" or something to make that happen... I sometimes want my working tree left around, but prefer the safety of knowing portage will install something from a known good starting point.
Seems to have been fixed.