From: "Fabian Groffen (grobian)" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] portage r11484 - in main/branches/prefix: cnf man pym/portage pym/portage/dbapi pym/repoman
Date: Mon, 01 Sep 2008 18:48:50 +0000 [thread overview]
Message-ID: <E1KaESI-00023k-U3@stork.gentoo.org> (raw)
Author: grobian
Date: 2008-09-01 18:48:49 +0000 (Mon, 01 Sep 2008)
New Revision: 11484
Modified:
main/branches/prefix/cnf/make.globals
main/branches/prefix/man/make.conf.5
main/branches/prefix/pym/portage/__init__.py
main/branches/prefix/pym/portage/dbapi/vartree.py
main/branches/prefix/pym/repoman/checks.py
main/branches/prefix/pym/repoman/errors.py
Log:
Merged from trunk -r11477:11483
| 11478 | In dep_zapdeps(), add a new choice category for choices that |
| zmedico | have packages that aren't yet installed but have been added |
| | to the graph. This category is given lower priority that the |
| | category for packages that are already installed. This helps |
| | dep_zapdeps() avoid making choices in some cases that would |
| | result in an unsolvable circular dependency. Thanks to Diego |
| | "Flameeyes" Petten?\195?\178 for reporting a circular dependency |
| | issue involving that java overlay which is solved by this |
| | patch. The particular issue was triggered when attempting to |
| | install dev-java/icedtea6 for the first time. A circular |
| | dependency between dev-java/eclipse-ecj-3.2.2-r1 and |
| | dev-java/icedtea6-1.2 occured since icedtea6 was chosen to |
| | satisfy the jdk dependency of eclipse-ecj, even though |
| | sun-jdk-1.6.0.07 was already installed and capable of |
| | satisfying the dependency. This patch solves the issue by |
| | causing sun-jdk to be properly selected to satisfy the jdk |
| | dependency of eclipse-ecj. |
| 11479 | Add support for FEATURES="protect-owned" which is identical |
| zmedico | to the collision-protect 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 unmerge-orphans feature. |
| | The additional tolerance makes this feature more suitable |
| | than collision-protect for being enabled by default. In |
| | order to ensure smooth operation of protect-owned in all |
| | cases, we also have to set COLLISION_IGNORE="/lib/modules" |
| | since files inside this directory are never unmerge. By |
| | enabling protect-owned by default, users are protected from |
| | problems that may occur due interactions with file |
| | collisions and the unmerge-orphans feature which is also |
| | enabled by default. |
| 11480 | Add a warning for emake -j1 calls which disable |
| zmedico | parallelization. Thanks to Diego "Flameeyes" Petten?\195?\178 for |
| | the suggestion. |
| 11481 | Check for calls to the deprecated bindnow-flags function. |
| zmedico | Thanks to Diego "Flameeyes" Petten?\195?\178 for the suggestion. |
| 11482 | Adjust EMakeParallelDisabled.re to require at least one |
| zmedico | space after emake. |
| 11483 | Update PORTAGE_RSYNC_OPTS docs to reflect that |
| zmedico | --delete-after is no longer used by default. |
Modified: main/branches/prefix/cnf/make.globals
===================================================================
--- main/branches/prefix/cnf/make.globals 2008-09-01 17:06:38 UTC (rev 11483)
+++ main/branches/prefix/cnf/make.globals 2008-09-01 18:48:49 UTC (rev 11484)
@@ -38,8 +38,14 @@
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"
Modified: main/branches/prefix/man/make.conf.5
===================================================================
--- main/branches/prefix/man/make.conf.5 2008-09-01 17:06:38 UTC (rev 11483)
+++ main/branches/prefix/man/make.conf.5 2008-09-01 18:48:49 UTC (rev 11484)
@@ -82,8 +82,10 @@
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"
@@ -171,7 +173,7 @@
.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
@@ -267,6 +269,20 @@
`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
@@ -321,7 +337,7 @@
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.
@@ -500,7 +516,7 @@
\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
Modified: main/branches/prefix/pym/portage/__init__.py
===================================================================
--- main/branches/prefix/pym/portage/__init__.py 2008-09-01 17:06:38 UTC (rev 11483)
+++ main/branches/prefix/pym/portage/__init__.py 2008-09-01 18:48:49 UTC (rev 11484)
@@ -6266,6 +6266,7 @@
# d) is the first item
preferred = []
+ preferred_not_installed = []
preferred_any_slot = []
possible_upgrades = []
other = []
@@ -6346,7 +6347,7 @@
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
@@ -6366,7 +6367,7 @@
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:
@@ -6380,6 +6381,7 @@
# 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:]
Modified: main/branches/prefix/pym/portage/dbapi/vartree.py
===================================================================
--- main/branches/prefix/pym/portage/dbapi/vartree.py 2008-09-01 17:06:38 UTC (rev 11483)
+++ main/branches/prefix/pym/portage/dbapi/vartree.py 2008-09-01 18:48:49 UTC (rev 11484)
@@ -3379,12 +3379,15 @@
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" + \
@@ -3452,6 +3455,9 @@
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
@@ -3459,7 +3465,7 @@
"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,
Modified: main/branches/prefix/pym/repoman/checks.py
===================================================================
--- main/branches/prefix/pym/repoman/checks.py 2008-09-01 17:06:38 UTC (rev 11483)
+++ main/branches/prefix/pym/repoman/checks.py 2008-09-01 18:48:49 UTC (rev 11484)
@@ -268,12 +268,25 @@
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
Modified: main/branches/prefix/pym/repoman/errors.py
===================================================================
--- main/branches/prefix/pym/repoman/errors.py 2008-09-01 17:06:38 UTC (rev 11483)
+++ main/branches/prefix/pym/repoman/errors.py 2008-09-01 18:48:49 UTC (rev 11484)
@@ -13,3 +13,5 @@
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'
reply other threads:[~2008-09-01 18:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1KaESI-00023k-U3@stork.gentoo.org \
--to=grobian@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox