summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-15 20:25:18 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-15 20:25:18 +0000
commit5ee8eaa1c917ea709ee1eb19efd8528908e245ae (patch)
treeccc1e5bfe1ca490aee2ea8a90a19ca3289adb9d4
parentb4a5cfa5a9eb03fecc9133970f0afd20899565cf (diff)
downloadportage-5ee8eaa1c917ea709ee1eb19efd8528908e245ae.tar.gz
portage-5ee8eaa1c917ea709ee1eb19efd8528908e245ae.tar.bz2
portage-5ee8eaa1c917ea709ee1eb19efd8528908e245ae.zip
For bug #182157, don't let unmerge-orphans unlink symlinks to directories since that can remove /lib and /usr/lib symlinks.
svn path=/main/trunk/; revision=6850
-rw-r--r--pym/portage/dbapi/vartree.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 182c129c4..a773f8a50 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1193,8 +1193,11 @@ class dblink(object):
writemsg_stdout("--- cfgpro %s %s\n" % (pkgfiles[objkey][0], obj))
continue
+ # Don't unlink symlinks to directories here since that can
+ # remove /lib and /usr/lib symlinks.
if unmerge_orphans and \
lstatobj and not stat.S_ISDIR(lstatobj.st_mode) and \
+ not (islink and statobj and stat.S_ISDIR(statobj.st_mode)) and \
not self.isprotected(obj):
try:
# Remove permissions to ensure that any hardlinks to