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

Unified Diff: parallel_emerge

Issue 2870068: parallel_emerge: Fix builds when PORTAGE_BINHOST is unset (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git
Patch Set: Move test down into function 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 49cf7b2f4d1e29caafc786bcf301ecab9c14b239..12548fa878444c88c91de6667fd710dce7622f00 100755
--- a/parallel_emerge
+++ b/parallel_emerge
@@ -744,17 +744,24 @@ class DepGraphGenerator(object):
if this_pkg["action"] == "nomerge":
this_pkg["action"] = "merge"
- def RemotePackageDatabase():
+ def RemotePackageDatabase(binhost_url):
"""Grab the latest binary package database from the prebuilt server.
We need to know the modification times of the prebuilt packages so that we
know when it is OK to use these packages and when we should rebuild them
instead.
+ Args:
+ binhost_url: Base URL of remote packages (PORTAGE_BINHOST).
+
Returns:
A dict mapping package identifiers to modification times.
"""
- url = self.emerge.settings["PORTAGE_BINHOST"] + "/Packages"
+
+ if not binhost_url:
+ return {}
+
+ url = binhost_url + "/Packages"
prebuilt_pkgs = {}
f = urllib2.urlopen(url)
@@ -953,7 +960,7 @@ class DepGraphGenerator(object):
cycles = FindCycles()
if self.rebuild:
local_pkgs = LocalPackageDatabase()
- remote_pkgs = RemotePackageDatabase()
+ remote_pkgs = RemotePackageDatabase(emerge.settings["PORTAGE_BINHOST"])
AutoRebuildDeps(local_pkgs, remote_pkgs, cycles)
# We need to remove installed packages so that we can use the dependency
« 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