aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-06-15 16:42:44 -0700
committerZac Medico <zmedico@gentoo.org>2012-06-15 16:42:44 -0700
commit0c29f1531fe9787cd1bd96fcd5c34ec5e6128aa4 (patch)
tree687650f2d073ba3fef37b5bf12436c1e017dd9e9
parentAdd USE + license autounmask for bug #420847. (diff)
downloadportage-0c29f1531fe9787cd1bd96fcd5c34ec5e6128aa4.tar.gz
portage-0c29f1531fe9787cd1bd96fcd5c34ec5e6128aa4.tar.bz2
portage-0c29f1531fe9787cd1bd96fcd5c34ec5e6128aa4.zip
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 fbbf49dcf..5448bd431 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