When a directory exists which has the same name as a normal file that portage is trying to install, the file is not installed properly. For example, on my system disk corruption caused /usr/include/security/pam_appl.h and /usr/include/security/pam_modules.h to be replaced with directories. When I re-merged pam these files were not fixed, so anything which tried to include these files failed building. Reproducible: Always Steps to Reproduce: 1.Replace file installed by an ebuild with a directory 2.emerge the ebuild 3. Actual Results: the bogus directory is still in place Expected Results: either the directory should be replaced with the file, or an error should be produced. I'm not picky... Portage 2.0.49-r3 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.20-xfs-r2) ================================================================= System uname: 2.4.20-xfs-r2 i586 AMD-K6(tm) 3D processor ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=i586 -O3 -pipe" CHOST="i586-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=i586 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox ccache autoaddcvs" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ libwww mad mikmod mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib gtkhtml gdbm berkdb slang readline arts bonobo svga tcltk java guile mysql X sdl gpm tcpd pam ssl perl python esd imlib oggvorbis gnome gtk qt kde motif opengl ldap 3dfx alsa cdr doc gphoto2 imap lirc mbox mozilla pda pnp samba scanner slp usb voodoo3 forgery"
This will be up for testing in portage-2.0.50_pre9.
unlink doesn't like directories and we basically ignore the exception: try: os.unlink(obj) print "<<< ","sym",obj except (OSError,IOError),e: print "!!! ","sym",obj #immutable? pass
*** This bug has been marked as a duplicate of 23851 ***