Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: parallel_emerge

Issue 2825076: Actually disable collision-protect in parallel_emerge. (Closed) Base URL: ssh://git@chromiumos-git/crosutils.git
Patch Set: NO TYPOS! Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: parallel_emerge
diff --git a/parallel_emerge b/parallel_emerge
index 58c2e963da537c34a5469b020969490c654e3324..5c7d82c37331cb3ee5ca43894015500e58389bf8 100755
--- a/parallel_emerge
+++ b/parallel_emerge
@@ -315,6 +315,20 @@ class DepGraphGenerator(object):
if "--accept-properties" in opts:
os.environ["ACCEPT_PROPERTIES"] = opts["--accept-properties"]
+ # Portage has two flags for doing collision protection: collision-protect
+ # and protect-owned. The protect-owned feature is enabled by default and
+ # is quite useful: it checks to make sure that we don't have multiple
+ # packages that own the same file. The collision-protect feature is more
+ # strict, and less useful: it fails if it finds a conflicting file, even
+ # if that file was created by an earlier ebuild that failed to install.
+ #
+ # We want to disable collision-protect here because we don't handle
+ # failures during the merge step very well. Sometimes we leave old files
+ # lying around and they cause problems, so for now we disable the flag.
+ # TODO(davidjames): Look for a better solution.
+ features = os.environ.get("FEATURES", "") + " -collision-protect"
+ os.environ["FEATURES"] = features
+
# Now that we've setup the necessary environment variables, we can load the
# emerge config from disk.
settings, trees, mtimedb = load_emerge_config()
@@ -356,9 +370,6 @@ class DepGraphGenerator(object):
if (settings.get("PORTAGE_DEBUG", "") == "1" and
"python-trace" in settings.features):
portage.debug.set_trace(True)
- # Since we don't have locking around merges, the collision-protect
- # feature doesn't make sense.
- settings.features.discard("collision-protect")
# Complain about unsupported options
for opt in ("--ask", "--ask-enter-invalid", "--complete-graph",
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698