Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140159 - emerge deleting files if the ebuild is already installed with FEATURE="keepwork"
Summary: emerge deleting files if the ebuild is already installed with FEATURE="keepwork"
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Low major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 136244
  Show dependency tree
 
Reported: 2006-07-12 14:47 UTC by Andy Fong
Modified: 2006-07-15 10:00 UTC (History)
0 users

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


Attachments
emerge output (bug,9.54 KB, text/plain)
2006-07-12 14:48 UTC, Andy Fong
Details
emerge output of ncurses (ncurses_emerge,155.15 KB, text/plain)
2006-07-13 11:36 UTC, Andy Fong
Details
ncurses install when "keepwork" is on (ncurses_image_install,232.78 KB, text/plain)
2006-07-13 12:06 UTC, Andy Fong
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Fong 2006-07-12 14:47:36 UTC
I have this happened to the ncurse ebuild yesterday multiple time when I re-emerge it without cleaning /var/tmp/portage/ and now it happens when I 
emerge portage. The major problem is that I can't emerge anymore because all files for the portage ebuild are gone. This is serious. It removes the stuff it needs for installation process later and failed. So, it ended up removing without installing.

Attached is the output.
Comment 1 Andy Fong 2006-07-12 14:48:17 UTC
Created attachment 91601 [details]
emerge output
Comment 2 Andy Fong 2006-07-12 14:52:05 UTC
On the case of the ncurse ebuild, I don't have the output for it but all the sh and a lot of over stuff for some reason depends on it. So, after the libraries was removed, it cannot re-install failed because some tool it uses failed the library dependency. 

Is my system totally broken or is it a bug?

Comment 3 Zac Medico gentoo-dev 2006-07-12 15:08:21 UTC
That's strange. Go ahead and follow the steps to recover here:

http://www.gentoo.org/proj/en/portage/doc/manually-fixing-portage.xml

After that, please post your `emerge --info`.
Comment 4 Zac Medico gentoo-dev 2006-07-12 15:38:43 UTC
It seems like you have something like "keepwork" in FEATURES.  That feature should not be enabled normally.  Apparently you had a bogus /var/tmp/portage/portage-2.1.1_pre2-r8/.installed file even though a previous install phase hadn't completed successfully.  That shouldn't happen, normally.
Comment 5 Andy Fong 2006-07-13 10:19:27 UTC
Yes. I have "keepwork" in FEATURE. I have taken it out.
The procedure brings back all the tools but when I "emerge portage", it gets stuck when checking the patch .bz2 file. 
The process 
/bin/bash /usr/lib/portage/bin/sed -r s/('|`|")//g; s/^/"-g/; s/$/"/
take up 100% cpu and never complete. I tried other ebuilds and same thing. It passes checking for the main tar.bz2 file but get stuck at checking whatever_patch.bz2. 

I have post to the forum but not much help yet. Can you shred some light on this? Should I move this offline privately? Thanks.
Comment 6 Zac Medico gentoo-dev 2006-07-13 10:24:49 UTC
(In reply to comment #5)
> The process 
> /bin/bash /usr/lib/portage/bin/sed -r s/('|`|")//g; s/^/"-g/; s/$/"/
> take up 100% cpu and never complete. I tried other ebuilds and same thing.

Just remove /usr/lib/portage/bin/sed because it's only intended for bsd systems.
Comment 7 Andy Fong 2006-07-13 10:45:55 UTC
That does it. 
Here is the output of emerge --info:

coilover bin # emerge --info
Portage 2.1.1_pre2-r8 (default-linux/amd64/2006.0, gcc-4.1.1/amd64-vanilla, glibc-2.4-r3, 2.6.16-gentoo x86_64)
=================================================================
                       System Settings
=================================================================
System uname: 2.6.16-gentoo x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.1
app-admin/eselect-compiler: 2.0.0_rc1-r5
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib64/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.gtlib.gatech.edu/pub/gentoo "
LC_ALL="en_US.utf8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac acpi alsa apm audiofile avi berkdb bitmap-fonts browserplugin bzip2 cairo cdparanoia cdr cjk cli crypt cups dbus divx4linux dlloader dri dv dvd dvdr dvdread eds emboss encode evo firefox flac foomaticdb fortran gif gimpprint glade glitz gnome gpm gstreamer gtk gtk2 gtkhtml hal iconv ieee1394 imagemagick imlib ipv6 isdnlog jpeg lzw lzw-tiff matroska mjpeg mozilla mp3 mpeg mppe-mppc mysql ncurses nls nptl nptlonly nsplugin opengl pam pcre pdflib perl png pppd python qt3 qt4 quicktime readline reflection samba sdl session spell spl sse3 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode usb v4l v4l2 xorg xpm xv zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_nv video_cards_vesa video_cards_nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 8 Zac Medico gentoo-dev 2006-07-13 11:08:06 UTC
I'm not sure why /var/tmp/portage/portage-2.1.1_pre2-r8/.installed existed while /var/tmp/portage/portage-2.1.1_pre2-r8/image/ did not exist. Do you have any idea why?  Anyway, I've added a sanity check in svn r3852 to that it will die if "${D}" does not exist.
Comment 9 Andy Fong 2006-07-13 11:36:26 UTC
Created attachment 91652 [details]
emerge output of ncurses

Just to get to the bottom of it. The "keepwork" FEATURE is what's making the bug happen. After emerge, all ncurses files are gone without any error. Only complain about the image directory doesn't exist.
Comment 10 Andy Fong 2006-07-13 12:06:44 UTC
Created attachment 91656 [details]
ncurses install when "keepwork" is on

I see it installing everything into the image directory but the directory is gone after it's done. 

I ran "make DESTDIR="/var/tmp/portage/ncurses-5.5-r3/image/" install" in one of the direcotry under work and it creates the image directory. So, something is removing the image directory and causing the problem.
Comment 11 Zac Medico gentoo-dev 2006-07-13 12:30:32 UTC
I understand now.  The .installed file is left from the previous merge because of FEATURES=keepwork bug the file in ${D} are no longer there because they've been merged already.  I've reproduced the problem locally and the sanity check mentioned in comment #8 worked as expected to prevent it from reaching the merge phase.  I've also added another sanity check in svn r3857 for the merge phase itself.
Comment 12 Zac Medico gentoo-dev 2006-07-15 10:00:14 UTC
This has been released in 2.1.1_pre3.