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.
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)