aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid James <davidjames@google.com>2011-05-01 10:21:45 -0700
committerZac Medico <zmedico@gentoo.org>2011-05-01 10:21:45 -0700
commit470871eeafa89a05486d4eb6f3f7626c1f813e4d (patch)
treeaeb8eb32a862b2a0e271755372ba4c9994b50800 /pym/portage/dbapi/bintree.py
parentrepoman: remove most old-style virtual checks (diff)
downloadportage-470871eeafa89a05486d4eb6f3f7626c1f813e4d.tar.gz
portage-470871eeafa89a05486d4eb6f3f7626c1f813e4d.tar.bz2
portage-470871eeafa89a05486d4eb6f3f7626c1f813e4d.zip
emerge: add --rebuild and --norebuild-atoms opts
Rebuild when build-time/run-time deps are upgraded. If pkgA has been updated, and pkgB depends on pkgA at both build-time and run-time, pkgB needs to be rebuilt. This feature ensures that all packages are consistent when dependencies that are used at both runtime and build time are changed. This feature only rebuilds packages one layer deep. That means that if you upgrade libcros, for example, packages that depend directly on libcros will be rebuilt and reinstalled, but indirect dependencies will not be rebuilt. BUG=chromium-os:14296 TEST=Test whether packages rebuilding a bunch of packages. Change-Id: Idbc0532b4b1de28fd9e5a0abe3b7dbe1a3abd2c8 Review URL: http://codereview.chromium.org/6905107
Diffstat (limited to 'pym/portage/dbapi/bintree.py')
-rw-r--r--pym/portage/dbapi/bintree.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 16b79db47..33cd6580c 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."""