Lines 7111-7119
Link Here
|
7111 |
others_in_slot.append(dblink(self.cat, catsplit(cur_cpv)[1], |
7111 |
others_in_slot.append(dblink(self.cat, catsplit(cur_cpv)[1], |
7112 |
self.vartree.root, self.settings, |
7112 |
self.vartree.root, self.settings, |
7113 |
vartree=self.vartree)) |
7113 |
vartree=self.vartree)) |
7114 |
claimed_paths = set() |
7114 |
dest_root = normalize_path(self.vartree.root).rstrip(os.path.sep) + \ |
7115 |
for dblnk in others_in_slot: |
7115 |
os.path.sep |
7116 |
claimed_paths.update(dblnk.getcontents()) |
7116 |
dest_root_len = len(dest_root) |
7117 |
|
7117 |
|
7118 |
unmerge_orphans = "unmerge-orphans" in self.settings.features |
7118 |
unmerge_orphans = "unmerge-orphans" in self.settings.features |
7119 |
|
7119 |
|
Lines 7129-7140
Link Here
|
7129 |
obj = normalize_path(objkey) |
7129 |
obj = normalize_path(objkey) |
7130 |
file_data = pkgfiles[objkey] |
7130 |
file_data = pkgfiles[objkey] |
7131 |
file_type = file_data[0] |
7131 |
file_type = file_data[0] |
7132 |
if obj in claimed_paths: |
|
|
7133 |
# A new instance of this package claims the file, so don't |
7134 |
# unmerge it. |
7135 |
writemsg_stdout("--- !owned %s %s\n" % \ |
7136 |
(pkgfiles[objkey][0], obj)) |
7137 |
continue |
7138 |
statobj = None |
7132 |
statobj = None |
7139 |
try: |
7133 |
try: |
7140 |
statobj = os.stat(obj) |
7134 |
statobj = os.stat(obj) |
Lines 7149-7154
Link Here
|
7149 |
if lstatobj is None: |
7143 |
if lstatobj is None: |
7150 |
writemsg_stdout("--- !found %s %s\n" % (file_type, obj)) |
7144 |
writemsg_stdout("--- !found %s %s\n" % (file_type, obj)) |
7151 |
continue |
7145 |
continue |
|
|
7146 |
if obj.startswith(dest_root): |
7147 |
relative_path = obj[dest_root_len:] |
7148 |
is_owned = False |
7149 |
for dblnk in others_in_slot: |
7150 |
if dblnk.isowner(relative_path, dest_root): |
7151 |
is_owned = True |
7152 |
break |
7153 |
if is_owned: |
7154 |
# A new instance of this package claims the file, so |
7155 |
# don't unmerge it. |
7156 |
writemsg_stdout("--- !owned %s %s\n" % \ |
7157 |
(file_type, obj)) |
7158 |
continue |
7152 |
# next line includes a tweak to protect modules from being unmerged, |
7159 |
# next line includes a tweak to protect modules from being unmerged, |
7153 |
# but we don't protect modules from being overwritten if they are |
7160 |
# but we don't protect modules from being overwritten if they are |
7154 |
# upgraded. We effectively only want one half of the config protection |
7161 |
# upgraded. We effectively only want one half of the config protection |