summaryrefslogtreecommitdiffstats
path: root/pym/portage.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-15 20:26:26 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-15 20:26:26 +0000
commitdef36a667c634e9e16e9938b566f33aa979a5fae (patch)
tree92fbe3378c7dda45de609d1c766a3e091411dca7 /pym/portage.py
parentef8758c7665d406339238ccf56d10734b7d48aa7 (diff)
downloadportage-def36a667c634e9e16e9938b566f33aa979a5fae.tar.gz
portage-def36a667c634e9e16e9938b566f33aa979a5fae.tar.bz2
portage-def36a667c634e9e16e9938b566f33aa979a5fae.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/branches/2.1.2/; revision=6851
Diffstat (limited to 'pym/portage.py')
-rw-r--r--pym/portage.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 88bc3816c..dc8b3d842 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -7158,8 +7158,11 @@ class dblink:
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