Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 70989 - portage-2.0.51-r3 traceback with dangling symlink
Summary: portage-2.0.51-r3 traceback with dangling symlink
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 70819 70828 73057 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-12 11:37 UTC by Aron Griffis (RETIRED)
Modified: 2005-04-14 06:52 UTC (History)
3 users (show)

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


Attachments
2.0.51-r3.bad.symlink.patch (2.0.51-r3.bad.symlink.patch,677 bytes, patch)
2004-11-12 19:43 UTC, Jason Stubbs (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Griffis (RETIRED) gentoo-dev 2004-11-12 11:37:57 UTC
portage blows up when it tries to overwrite a dangling symlink on installation.  Here's an easy way to demonstrate on a small package:

# ln -sfn bogus /usr/libexec/mozilla-launcher
# emerge mozilla-launcher
...
>>> Merging net-www/mozilla-launcher-1.22 to /
--- /usr/
--- /usr/libexec/
Traceback (most recent call last):
  File "/usr/bin/emerge", line 2991, in ?
    mydepgraph.merge(mydepgraph.altlist())
  File "/usr/bin/emerge", line 1839, in merge
    retval=portage.doebuild(y,"merge",myroot,self.pkgsettings,edebug)
  File "/usr/lib/portage/pym/portage.py", line 2562, in doebuild
    return merge(mysettings["CATEGORY"],mysettings["PF"],mysettings["D"],mysettings["BUILDDIR"]+"/build-info",myroot,mysettings,myebuild=mysettings["EBUILD"])
  File "/usr/lib/portage/pym/portage.py", line 2695, in merge
    return mylink.merge(pkgloc,infloc,myroot,myebuild)
  File "/usr/lib/portage/pym/portage.py", line 6670, in merge
    return self.treewalk(mergeroot,myroot,inforoot,myebuild,cleanup=cleanup)
  File "/usr/lib/portage/pym/portage.py", line 6297, in treewalk
    if self.mergeme(srcroot,destroot,outfile,secondhand,"",cfgfiledict,mymtime):
  File "/usr/lib/portage/pym/portage.py", line 6536, in mergeme
    if self.mergeme(srcroot,destroot,outfile,secondhand,offset+x+"/",cfgfiledict,thismtime):
  File "/usr/lib/portage/pym/portage.py", line 6536, in mergeme
    if self.mergeme(srcroot,destroot,outfile,secondhand,offset+x+"/",cfgfiledict,thismtime):
  File "/usr/lib/portage/pym/portage.py", line 6551, in mergeme
    elif stat.S_ISREG(mydmode) or (stat.S_ISLNK(mydmode) and stat.S_ISREG(os.stat(mydest)[stat.ST_MODE])):
OSError: [Errno 2] No such file or directory: '/usr/libexec/mozilla-launcher'

Be sure to fix it afterward, otherwise you'll next file a bug against me about mozilla-launcher. ;-)

# rm -f /usr/libexec/mozilla-launcher
# emerge mozilla-launcher

----
Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.8-gentoo-r4-kt600 i686)
=================================================================
System uname: 2.6.8-gentoo-r4-kt600 i686 AMD Athlon(tm) XP 1800+
Gentoo Base System version 1.6.6
distcc 2.18 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.57-r1,sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux-headers-2.4.22
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
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.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /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/X11/Sessions /etc/X11/app-defaults /etc/X11/gdm /etc/X11/rstart /etc/X11/serverconfig /etc/X11/starthere /etc/X11/sysconfig /etc/X11/xdm /etc/X11/xinit /etc/X11/xkb /etc/ethereal /etc/gconf /etc/gnome-vfs-2.0 /etc/gtk-2.0 /etc/init.d /etc/pam.d /etc/postfix/sample /etc/sound /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe"
DISTDIR="/usr/distfiles"
FEATURES="autoaddcvs ccache cvs distcc distlocks noclean sandbox sfperms userpriv usersandbox"
GENTOO_MIRRORS="http://mirrors.tds.net/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j4"
PKGDIR="/usr/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/local/home/agriffis/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X alsa apache2 apm avi berkdb bitmap-fonts bonobo cdr crypt cscope cups decss dga dvd encode evo f77 fam flac foomaticdb fortran gdbm gif gnome gstreamer gtk gtk2 gtkhtml guile imagemagick imap imlib java jpeg lcms libg++ libwww mad mailwrapper mikmod motif mozcalendar mozilla mpeg mysql ncurses nls ofx oggvorbis opengl oss pam pda pdflib perl png python qt quicktime readline ruby scanner sdl speex spell sqlite sse ssl tcltk tcpd tetex tiff truetype usb wmf x86 xml xml2 xmms xv zlib video_cards_radeon"
Comment 1 Jason Stubbs (RETIRED) gentoo-dev 2004-11-12 19:42:42 UTC
Fixed a while ago, but there was no bug. I'll attach the fix in a minute.
Comment 2 Jason Stubbs (RETIRED) gentoo-dev 2004-11-12 19:43:43 UTC
Created attachment 43841 [details, diff]
2.0.51-r3.bad.symlink.patch
Comment 3 Jason Stubbs (RETIRED) gentoo-dev 2004-11-12 19:44:59 UTC
*** Bug 70828 has been marked as a duplicate of this bug. ***
Comment 4 Jason Stubbs (RETIRED) gentoo-dev 2004-11-18 05:20:17 UTC
*** Bug 70819 has been marked as a duplicate of this bug. ***
Comment 5 Lars Bröcker 2004-11-25 07:33:59 UTC
Hi Jason. Thanks for pointing me this way. I'll try the patch and report on my experiences with it.
Comment 6 Lars Bröcker 2004-11-26 04:50:07 UTC
Hi, the patch worked, xorg installed okay. Thanks :)
Comment 7 Donnie Berkholz (RETIRED) gentoo-dev 2004-12-01 11:56:23 UTC
*** Bug 73057 has been marked as a duplicate of this bug. ***
Comment 8 Nicolas Vilz 2004-12-02 14:39:36 UTC
thx. fixed my texi2html-problem on ~ppc
Comment 9 Maik Danstedt 2004-12-03 02:58:18 UTC
This worked fine for my problem with xorg. :-)
Comment 10 Sascha Silbe 2005-01-11 01:19:57 UTC
I'm having the same problem while installing lapack after unmerging lapack-atlas. Will file a separate bug about lapack-atlas leaving this link behind. Any idea when the fix will get into mainstream Portage?  
Comment 11 Whit Blauvelt 2005-01-13 19:50:38 UTC
Yes, patch necessary. Please mainstream. (This for openssl on a system that went some months between updates.)
Comment 12 Aron Griffis (RETIRED) gentoo-dev 2005-03-13 20:10:06 UTC
Saw this again today, running portage-2.0.51.19 this time.  This instance was on a file /etc/._cfg*, so there might be some CONFIG_PROTECT magic mixed in.
Comment 13 Jason Stubbs (RETIRED) gentoo-dev 2005-04-14 06:52:48 UTC
I sincerely doubt that it was the same bug. Please open a new one with the error if it happens again.