Lines 3222-3235
class dblink(object):
Link Here
|
3222 |
|
3222 |
|
3223 |
os = _os_merge |
3223 |
os = _os_merge |
3224 |
|
3224 |
|
3225 |
collision_ignore = [] |
|
|
3226 |
for x in portage.util.shlex_split( |
3227 |
self.settings.get("COLLISION_IGNORE", "")): |
3228 |
if os.path.isdir(os.path.join(self._eroot, x.lstrip(os.sep))): |
3229 |
x = normalize_path(x) |
3230 |
x += "/*" |
3231 |
collision_ignore.append(x) |
3232 |
|
3233 |
# For collisions with preserved libraries, the current package |
3225 |
# For collisions with preserved libraries, the current package |
3234 |
# will assume ownership and the libraries will be unregistered. |
3226 |
# will assume ownership and the libraries will be unregistered. |
3235 |
if self.vartree.dbapi._plib_registry is None: |
3227 |
if self.vartree.dbapi._plib_registry is None: |
Lines 3330-3342
class dblink(object):
Link Here
|
3330 |
isowned = True |
3322 |
isowned = True |
3331 |
if not isowned: |
3323 |
if not isowned: |
3332 |
f_match = full_path[len(self._eroot)-1:] |
3324 |
f_match = full_path[len(self._eroot)-1:] |
3333 |
stopmerge = True |
3325 |
collisions.append(f) |
3334 |
for pattern in collision_ignore: |
|
|
3335 |
if fnmatch.fnmatch(f_match, pattern): |
3336 |
stopmerge = False |
3337 |
break |
3338 |
if stopmerge: |
3339 |
collisions.append(f) |
3340 |
return collisions, symlink_collisions, plib_collisions |
3326 |
return collisions, symlink_collisions, plib_collisions |
3341 |
|
3327 |
|
3342 |
def _lstat_inode_map(self, path_iter): |
3328 |
def _lstat_inode_map(self, path_iter): |
Lines 3951-3959
class dblink(object):
Link Here
|
3951 |
abort = True |
3937 |
abort = True |
3952 |
msg = symlink_abort_msg % (self.settings.mycpv,) |
3938 |
msg = symlink_abort_msg % (self.settings.mycpv,) |
3953 |
elif collision_protect: |
3939 |
elif collision_protect: |
3954 |
abort = True |
3940 |
# if all files were unowned and in COLLISION_IGNORE |
3955 |
msg = _("Package '%s' NOT merged due to file collisions.") % \ |
3941 |
# let it merge |
3956 |
self.settings.mycpv |
3942 |
abort = bool(owners) |
|
|
3943 |
if not owners: |
3944 |
collision_ignore = [] |
3945 |
for x in portage.util.shlex_split( |
3946 |
self.settings.get("COLLISION_IGNORE", "")): |
3947 |
if os.path.isdir(os.path.join(self._eroot, x.lstrip(os.sep))): |
3948 |
x = normalize_path(x) |
3949 |
x += "/*" |
3950 |
collision_ignore.append(x) |
3951 |
|
3952 |
flat_owned_files = [i for l in owners.values() for i in l] |
3953 |
|
3954 |
for f in collisions: |
3955 |
if f not in flat_owned_files: |
3956 |
if not any([fnmatch.fnmatch(f, pattern) |
3957 |
for pattern in collision_ignore]): |
3958 |
abort = True |
3959 |
break |
3960 |
|
3961 |
if abort: |
3962 |
msg = _("Package '%s' NOT merged due to file collisions.") % \ |
3963 |
self.settings.mycpv |
3964 |
else: |
3965 |
msg = _("Package '%s' merged despite file collisions.") % \ |
3966 |
self.settings.mycpv |
3957 |
elif protect_owned and owners: |
3967 |
elif protect_owned and owners: |
3958 |
abort = True |
3968 |
abort = True |
3959 |
msg = _("Package '%s' NOT merged due to file collisions.") % \ |
3969 |
msg = _("Package '%s' NOT merged due to file collisions.") % \ |
3960 |
- |
|
|