Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29015 - Portage does not deal well when a directory has the same name as a file that is being installed
Summary: Portage does not deal well when a directory has the same name as a file that ...
Status: RESOLVED DUPLICATE of bug 23851
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-17 16:03 UTC by A. Craig West
Modified: 2005-10-07 08:13 UTC (History)
1 user (show)

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 A. Craig West 2003-09-17 16:03:57 UTC
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"
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2003-12-24 17:08:59 UTC
This will be up for testing in portage-2.0.50_pre9.
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2004-08-03 13:14:50 UTC
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
Comment 3 Jason Stubbs (RETIRED) gentoo-dev 2005-10-07 08:13:06 UTC

*** This bug has been marked as a duplicate of 23851 ***