summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dbapi/vartree.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 1a38d421a..0c0ed6a64 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1980,10 +1980,11 @@ class dblink(object):
unmerge_desc["!mtime"] = _("!mtime")
unmerge_desc["!obj"] = _("!obj")
unmerge_desc["!sym"] = _("!sym")
+ unmerge_desc["!prefix"] = _("!prefix")
real_root = self.settings['ROOT']
real_root_len = len(real_root) - 1
- eroot_split_len = len(self.settings["EROOT"].split(os.sep)) - 1
+ eroot = self.settings["EROOT"]
# These files are generated by emerge, so we need to remove
# them when they are the only thing left in a directory.
@@ -2023,6 +2024,12 @@ class dblink(object):
file_data = pkgfiles[objkey]
file_type = file_data[0]
+
+ # don't try to unmerge the prefix offset itself
+ if len(obj) <= len(eroot) or not obj.startswith(eroot):
+ show_unmerge("---", unmerge_desc["!prefix"], file_type, obj)
+ continue
+
statobj = None
try:
statobj = os.stat(obj)