summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-15 22:53:33 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-15 22:53:33 +0000
commit64f8c4f7a2522654989008adb5be79f64f02528e (patch)
treef608ab122db915b58aa64d8f352215bfbd08c473 /pym
parent4d5039da85d5fa1422c5c4dfb944c6fbb1006ab6 (diff)
downloadportage-64f8c4f7a2522654989008adb5be79f64f02528e.tar.gz
portage-64f8c4f7a2522654989008adb5be79f64f02528e.tar.bz2
portage-64f8c4f7a2522654989008adb5be79f64f02528e.zip
Go ahead and unlink symlinks to directories when they're actually recorded as symlinks in the contents. (trunk r6860)
svn path=/main/branches/2.1.2/; revision=6861
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/pym/portage.py b/pym/portage.py
index fce0c27e3..09554e935 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -7189,11 +7189,13 @@ class dblink:
if not islink:
writemsg_stdout("--- !sym %s %s\n" % ("sym", obj))
continue
- # Don't unlink symlinks to directories here since that can
- # remove /lib and /usr/lib symlinks.
- if statobj and stat.S_ISDIR(statobj.st_mode):
- writemsg_stdout("--- !sym %s %s\n" % ("sym", obj))
- continue
+ # Go ahead and unlink symlinks to directories here when
+ # they're actually recorded as symlinks in the contents.
+ # Normally, symlinks such as /lib -> lib64 are not recorded
+ # as symlinks in the contents of a package. If a package
+ # installs something into ${D}/lib/, it is recorded in the
+ # contents as a directory even if it happens to correspond
+ # to a symlink when it's merged to the live filesystem.
try:
os.unlink(obj)
writemsg_stdout("<<< %s %s\n" % ("sym",obj))