# Ignore file collisions in /lib/modules since files inside this directory
# are never unmerged, and therefore collisions must be ignored in order for
# FEATURES=protect-owned to operate smoothly in all cases.
-COLLISION_IGNORE="/lib/modules"
-
# Ignore file collisions for unowned *.pyo and *.pyc files, this helps during
# transition from compiling python modules in live file system to compiling
# them in src_install() function.
-COLLISION_IGNORE_UNOWNED="*.py[co]"
+COLLISION_IGNORE="/lib/modules/* *.py[co]"
# Enable preserve-libs for testing with portage versions that support it.
# This setting is commented out for portage versions that don't support it.
.br
Defaults to 5 seconds.
.TP
-\fBCOLLISION_IGNORE\fR = \fI[space delimited list of files and/or directories]\fR
+\fBCOLLISION_IGNORE\fR = \fI[space delimited list of shell patterns]\fR
This variable allows the user to disable \fIcollision\-protect\fR and
-\fIprotect\-owned\fR for specific files and/or directories.
+\fIprotect\-owned\fR for specific shell patterns. For backward
+compatibility, directories that are listed without a shell pattern will
+automatically have /* appended to them.
.br
-Defaults to /lib/modules.
-.TP
-\fBCOLLISION_IGNORE_UNOWNED\fR = \fI[space delimited list of shell patterns]\fR
-This variable allows the user to disable \fIcollision\-protect\fR and
-\fIprotect\-owned\fR for specific shell patterns for files that are
-not owned by any packages.
-.br
-Defaults to *.pyc and *.pyo patterns.
+Defaults to "/lib/modules/* *.py[co]".
.TP
\fBCONFIG_PROTECT\fR = \fI[space delimited list of files and/or directories]\fR
All files and/or directories that are defined here will have "config file protection"
os = _os_merge
- collision_ignore = set([normalize_path(myignore) for myignore in \
- portage.util.shlex_split(
- self.settings.get("COLLISION_IGNORE", ""))])
-
- unowned_ignore_patterns = self.settings.get(
- "COLLISION_IGNORE_UNOWNED", "").split()
+ collision_ignore = []
+ for x in portage.util.shlex_split(
+ self.settings.get("COLLISION_IGNORE", "")):
+ if os.path.isdir(os.path.join(self._eroot, x.lstrip(os.sep))):
+ x = normalize_path(x)
+ x += "/*"
+ collision_ignore.append(x)
# For collisions with preserved libraries, the current package
# will assume ownership and the libraries will be unregistered.
if not isowned:
f_match = full_path[len(self._eroot)-1:]
stopmerge = True
- if collision_ignore:
- if f_match in collision_ignore:
- stopmerge = False
- else:
- for myignore in collision_ignore:
- if f_match.startswith(myignore + os.path.sep):
- stopmerge = False
- break
- for pattern in unowned_ignore_patterns:
+ for pattern in collision_ignore:
if fnmatch.fnmatch(f_match, pattern):
stopmerge = False
break
# portage config variables and variables set directly by portage
environ_filter += [
"ACCEPT_CHOSTS", "ACCEPT_KEYWORDS", "ACCEPT_PROPERTIES", "AUTOCLEAN",
- "CLEAN_DELAY", "COLLISION_IGNORE", "COLLISION_IGNORE_UNOWNED",
+ "CLEAN_DELAY", "COLLISION_IGNORE",
"CONFIG_PROTECT", "CONFIG_PROTECT_MASK",
"EGENCACHE_DEFAULT_OPTS", "EMERGE_DEFAULT_OPTS",
"EMERGE_LOG_DIR",