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

Unified Diff: parallel_emerge

Issue 6055004: Fix bug 10466: parallel_emerge use flag calculation favors local binhost. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Created 10 years 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 930f53dcd6f1982d92000cb2a74421378182ecb8..6f98f41dfac24460684a3142c223254f0a3c8674 100755
--- a/parallel_emerge
+++ b/parallel_emerge
@@ -1192,41 +1192,23 @@ class DepGraphGenerator(object):
"""Update packages that can use prebuilts to do so."""
start = time.time()
- # The bintree is the database of binary packages. By default, it's
- # empty.
- bintree = emerge.trees[root]["bintree"]
- bindb = bintree.dbapi
- root_config = emerge.root_config
- pkgsettings = emerge.depgraph._frozen_config.pkgsettings[root]
- prebuilt_pkgs = {}
-
- # Populate the DB with packages
- bintree.populate("--getbinpkg" in emerge.opts,
- "--getbinpkgonly" in emerge.opts)
-
# Build list of prebuilt packages
+ prebuilt_pkgs = {}
for pkg, info in deps_map.iteritems():
if info and info["action"] == "merge":
if (not info["force_remote_binary"] and info["mandatory_source"] or
"--usepkgonly" not in emerge.opts and pkg not in remote_pkgs):
continue
- db_keys = list(bindb._aux_cache_keys)
- try:
- db_vals = bindb.aux_get(pkg, db_keys + ["MTIME"])
- except KeyError:
- # No binary package
- continue
-
- mtime = int(db_vals.pop() or 0)
- metadata = zip(db_keys, db_vals)
- db_pkg = Package(built=True, cpv=pkg, installed=False,
- metadata=metadata, onlydeps=False, mtime=mtime,
- operation="merge", root_config=root_config,
- type_name="binary")
+ db_pkg = emerge.depgraph._pkg(pkg, "binary", emerge.root_config)
+ if info["force_remote_binary"]:
+ # Undo our earlier hacks to the use flags so that the use flags
+ # display correctly.
+ db_pkg.use.enabled = db_pkg.metadata["USE"].split()
prebuilt_pkgs[pkg] = db_pkg
# Calculate what packages need to be rebuilt due to changes in use flags.
+ pkgsettings = emerge.depgraph._frozen_config.pkgsettings[root]
for pkg, db_pkg in prebuilt_pkgs.iteritems():
if not self.CheckUseFlags(pkgsettings, db_pkg, self.package_db[pkg]):
MergeChildren(pkg, "mandatory_source")
« 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