summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-15 22:53:05 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-15 22:53:05 +0000
commit7952a52ad798e5e6130d739501683b6df236a5e4 (patch)
treefbb5454b0880d5de93c8fd1c46b6a884ea482a6c
parent8ecd48c6dfb08da5830a303ea8c99a1ff0997932 (diff)
downloadportage-7952a52ad798e5e6130d739501683b6df236a5e4.tar.gz
portage-7952a52ad798e5e6130d739501683b6df236a5e4.tar.bz2
portage-7952a52ad798e5e6130d739501683b6df236a5e4.zip
Go ahead and unlink symlinks to directories when they're actually recorded as symlinks in the contents.
svn path=/main/trunk/; revision=6860
-rw-r--r--pym/portage/dbapi/vartree.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 5affc5f07..ee134547b 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1224,11 +1224,13 @@ class dblink(object):
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))