RESUMECOMMAND="wget -c -t 5 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
# Default user options
-FEATURES="distlocks parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
+FEATURES="distlocks parallel-fetch protect-owned sandbox
+ sfperms strict unmerge-orphans userfetch"
+
+# 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"
# Enable for global testing
FEATURES="${FEATURES} preserve-libs"
Defaults to 5 seconds.
.TP
\fBCOLLISION_IGNORE\fR = \fI[space delimited list of files and/or directories]\fR
-This variable allows the user to disable \fIcollision\-protect\fR for specific
-files and/or directories.
+This variable allows the user to disable \fIcollision\-protect\fR and
+\fIprotect\-owned\fR for specific files and/or directories.
+.br
+Defaults to /lib/modules.
.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"
.B collision\-protect
A QA\-feature to ensure that a package doesn't overwrite files it doesn't own.
The \fICOLLISION_IGNORE\fR variable can be used to selectively disable this
-feature.
+feature. Also see the related \fIprotect\-owned\fR feature.
.TP
.B digest
Autogenerate digests for packages when running the \fBemerge\fR(1) command. If
`tail \-f /var/log/emerge\-fetch.log` in a
terminal to view parallel-fetch progress.
.TP
+.B protect\-owned
+This is identical to the \fIcollision\-protect\fR feature except that files
+may be overwritten if they are not explicitly listed in the contents of a
+currently installed package. This is particularly useful on systems that
+have lots of orphan files that have been left behind by older versions
+of portage that did not support the \fIunmerge\-orphans\fR feature. Like
+\fIcollision\-protect\fR, the \fICOLLISION_IGNORE\fR variable can be used to
+selectively disable this feature. It is recommended to leave either
+\fIprotect\-owned\fR or \fIcollision\-protect\fR enabled at all times,
+since otherwise file collisions between packages may result in files being
+overwritten or uninstalled at inappropriate times.
+If \fIcollision\-protect\fR is enabled then it takes precedence over
+\fIprotect\-owned\fR.
+.TP
.B sandbox
Enable sandbox\-ing when running \fBemerge\fR(1) and \fBebuild\fR(1).
.TP
and \fIsrc_test()\fR in \fBebuild\fR(5). This feature implies the "test"
\fBUSE\fR flag.
.TP
-.B unmerge-orphans
+.B unmerge\-orphans
If a file is not claimed by another package in the same slot and it is not
protected by \fICONFIG_PROTECT\fR, unmerge it even if the modification time or
checksum differs from the file that was originally installed.
\fBDon't change this unless you know exactly what you're doing!\fR
.br
Defaults to "\-\-recursive \-\-links \-\-safe\-links \-\-perms \-\-times
-\-\-compress \-\-force \-\-whole\-file \-\-delete \-\-delete\-after \-\-stats
+\-\-compress \-\-force \-\-whole\-file \-\-delete \-\-stats
\-\-timeout=180 \-\-exclude='/distfiles' \-\-exclude='/local'
\-\-exclude='/packages'"
.TP
# d) is the first item
preferred = []
+ preferred_not_installed = []
preferred_any_slot = []
possible_upgrades = []
other = []
break
if all_in_graph:
if parent is None:
- preferred.append(this_choice)
+ preferred_not_installed.append(this_choice)
else:
# Check if the atom would result in a direct circular
# dependency and try to avoid that if it seems likely
circular_atom = atom
break
if circular_atom is None:
- preferred.append(this_choice)
+ preferred_not_installed.append(this_choice)
else:
other.append(this_choice)
else:
# into || ( highest version ... lowest version ). We want to prefer the
# highest all_available version of the new-style virtual when there is a
# lower all_installed version.
+ preferred.extend(preferred_not_installed)
preferred.extend(preferred_any_slot)
preferred.extend(possible_upgrades)
possible_upgrades = preferred[1:]
if collisions:
collision_protect = "collision-protect" in self.settings.features
+ protect_owned = "protect-owned" in self.settings.features
msg = "This package will overwrite one or more files that" + \
" may belong to other packages (see list below)."
- if not collision_protect:
- msg += " Add \"collision-protect\" to FEATURES in" + \
+ if not (collision_protect or protect_owned):
+ msg += " Add either \"collision-protect\" or" + \
+ " \"protect-owned\" to FEATURES in" + \
" make.conf if you would like the merge to abort" + \
- " in cases like this."
+ " in cases like this. See the make.conf man page for" + \
+ " more information about these features."
if self.settings.get("PORTAGE_QUIET") != "1":
msg += " You can use a command such as" + \
" `portageq owners / <filename>` to identify the" + \
if collision_protect:
msg = "Package '%s' NOT merged due to file collisions." % \
self.settings.mycpv
+ elif protect_owned and owners:
+ msg = "Package '%s' NOT merged due to file collisions." % \
+ self.settings.mycpv
else:
msg = "Package '%s' merged despite file collisions." % \
self.settings.mycpv
"messages for the whole content of the above message."
eerror(wrap(msg, 70))
- if collision_protect:
+ if collision_protect or (protect_owned and owners):
return 1
# The merge process may move files out of the image directory,
if self._iuse_def is None:
yield 'IUSE is not defined'
+class EMakeParallelDisabled(LineCheck):
+ """Check for emake -j1 calls which disable parallelization."""
+ repoman_check_name = 'ebuild.minorsyn'
+ re = re.compile(r'^\s*emake\s+-j\s*1\s')
+ error = errors.EMAKE_PARALLEL_DISABLED
+
+class DeprecatedBindnowFlags(LineCheck):
+ """Check for calls to the deprecated bindnow-flags function."""
+ repoman_check_name = 'ebuild.minorsyn'
+ re = re.compile(r'.*\$\(bindnow-flags\)')
+ error = errors.DEPRECATED_BINDNOW_FLAGS
+
_constant_checks = tuple((c() for c in (
EbuildHeader, EbuildWhitespace, EbuildQuote,
EbuildAssignment, EbuildUselessDodoc,
EbuildUselessCdS, EbuildNestedDie,
EbuildPatches, EbuildQuotedA,
- IUseUndefined, InheritAutotools)))
+ IUseUndefined, InheritAutotools,
+ EMakeParallelDisabled, DeprecatedBindnowFlags)))
def run_checks(contents, pkg):
checks = _constant_checks
NESTED_DIE_ERROR = 'Ebuild calls die in a subshell on line: %d'
PATCHES_ERROR = 'PATCHES is not a bash array on line: %d'
REDUNDANT_CD_S_ERROR = 'Ebuild has redundant cd ${S} statement on line: %d'
+EMAKE_PARALLEL_DISABLED = 'Ebuild calls emake -j1 on line: %d'
+DEPRECATED_BINDNOW_FLAGS = 'Deprecated bindnow-flags call on line: %d'