summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico2012-06-15 23:42:44 (GMT)
committerZac Medico2012-06-15 23:42:44 (GMT)
commit0c29f1531fe9787cd1bd96fcd5c34ec5e6128aa4 (patch)
tree687650f2d073ba3fef37b5bf12436c1e017dd9e9
parentb363b5342ac918f06e8752e702e68363d1388cdb (diff)
Unmerge symlink listed as dir for bug #421165.
-rw-r--r--pym/portage/dbapi/vartree.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index fbbf49d..5448bd4 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -2180,8 +2180,9 @@ class dblink(object):
is_owned = True
break
- if file_type == "sym" and is_owned and \
- (islink and statobj and stat.S_ISDIR(statobj.st_mode)):
+ if is_owned and islink and \
+ file_type in ("sym", "dir") 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
# directory and the unmerging package installed it as
@@ -2246,12 +2247,12 @@ class dblink(object):
show_unmerge("---", unmerge_desc["!mtime"], file_type, obj)
continue
- if pkgfiles[objkey][0] == "dir":
+ if file_type == "dir" and not islink:
if lstatobj is None or not stat.S_ISDIR(lstatobj.st_mode):
show_unmerge("---", unmerge_desc["!dir"], file_type, obj)
continue
mydirs.add((obj, (lstatobj.st_dev, lstatobj.st_ino)))
- elif pkgfiles[objkey][0] == "sym":
+ elif file_type == "sym" or (file_type == "dir" and islink):
if not islink:
show_unmerge("---", unmerge_desc["!sym"], file_type, obj)
continue