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

Unified Diff: pym/portage/dbapi/bintree.py

Issue 6905107: Rebuild when build-time/run-time deps are upgraded. (Closed) Base URL: git://git.overlays.gentoo.org/proj/portage.git@master
Patch Set: Address review feedback, add tests. Created 9 years, 8 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 | « pym/_emerge/resolver/backtracking.py ('k') | pym/portage/tests/resolver/test_rebuild.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pym/portage/dbapi/bintree.py
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 16b79db4776d94fb288b4c5518cd2575aa66532e..33cd6580c7c7cb49c994f8f3a3661bb9d51fc6bf 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -228,6 +228,7 @@ class binarytree(object):
self.invalids = []
self.settings = settings
self._pkg_paths = {}
+ self._pkgindex_uri = {}
self._populating = False
self._all_directory = os.path.isdir(
os.path.join(self.pkgdir, "All"))
@@ -874,8 +875,9 @@ class binarytree(object):
# Organize remote package list as a cpv -> metadata map.
remotepkgs = _pkgindex_cpv_map_latest_build(pkgindex)
remote_base_uri = pkgindex.header.get("URI", base_url)
- for remote_metadata in remotepkgs.values():
+ for cpv, remote_metadata in remotepkgs.items():
remote_metadata["BASE_URI"] = remote_base_uri
+ self._pkgindex_uri[cpv] = url
self._remotepkgs.update(remotepkgs)
self._remote_has_index = True
for cpv in remotepkgs:
@@ -1225,6 +1227,10 @@ class binarytree(object):
# package is downloaded, state is updated by self.inject().
return True
+ def get_pkgindex_uri(self, pkgname):
+ """Returns the URI to the Packages file for a given package."""
+ return self._pkgindex_uri.get(pkgname)
+
def gettbz2(self, pkgname):
"""Fetches the package from a remote site, if necessary. Attempts to
resume if the file appears to be partially downloaded."""
« no previous file with comments | « pym/_emerge/resolver/backtracking.py ('k') | pym/portage/tests/resolver/test_rebuild.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698