unmerge: fix false alarm about protected symlinks v2.2.0_alpha49
authorZac Medico <zmedico@gentoo.org>
Fri, 29 Jul 2011 20:16:34 +0000 (13:16 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 29 Jul 2011 20:16:34 +0000 (13:16 -0700)
The error message about preserved symlinks, from commit
4bb08136f073024c5d31dceb1618b6f4e7246369, should only be triggered in
cases when the package being unmerged has the given path listed as a
symlink in its CONTENTS.

pym/portage/dbapi/vartree.py

index e85e0b85acc4254eea7a9e6687b193397648c837..6317af7561ed8f1a86662752ad12687005c6bcbf 100644 (file)
@@ -2030,7 +2030,7 @@ class dblink(object):
                                                        is_owned = True
                                                        break
 
-                                       if is_owned and \
+                                       if file_type == "sym" and is_owned and \
                                                (islink and statobj and stat.S_ISDIR(statobj.st_mode)):
                                                # A new instance of this package claims the file, so
                                                # don't unmerge it. If the file is symlink to a