summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-07-13 17:56:57 -0700
committerZac Medico <zmedico@gentoo.org>2011-07-13 17:56:57 -0700
commitd85b7e5ceb8a1585b8b8a8e4383dc6de5450e616 (patch)
tree6fbaade3ee653c2d3a2aa664d6aa81fb094b3b90
parentf1d21db028b643c9d6a85afb2dfd6acb35ea52a1 (diff)
downloadportage-d85b7e5ceb8a1585b8b8a8e4383dc6de5450e616.tar.gz
portage-d85b7e5ceb8a1585b8b8a8e4383dc6de5450e616.tar.bz2
portage-d85b7e5ceb8a1585b8b8a8e4383dc6de5450e616.zip
debuild: pass dist digests to fetch()
This allows us to avoid parsing the Manifest twice.
-rw-r--r--pym/portage/package/ebuild/doebuild.py7
-rw-r--r--pym/portage/package/ebuild/fetch.py2
2 files changed, 7 insertions, 2 deletions
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 1849af94f..8e7515c98 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -478,6 +478,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
noiselevel=-1)
return 1
+ mf = None
if "strict" in features and \
"digest" not in features and \
tree == "porttree" and \
@@ -765,8 +766,12 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
else:
fetchme = alist
+ dist_digests = None
+ if mf is not None:
+ dist_digests = mf.getTypeDigests("DIST")
if not fetch(fetchme, mysettings, listonly=listonly,
- fetchonly=fetchonly, allow_missing_digests=True):
+ fetchonly=fetchonly, allow_missing_digests=True,
+ digests=dist_digests):
spawn_nofetch(mydbapi, myebuild, settings=mysettings)
if listonly:
# The convention for listonly mode is to report
diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py
index 46d77cf74..2ae1fe85b 100644
--- a/pym/portage/package/ebuild/fetch.py
+++ b/pym/portage/package/ebuild/fetch.py
@@ -358,7 +358,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
if digests is None and not (pkgdir is None or skip_manifest):
mydigests = Manifest(
pkgdir, mysettings["DISTDIR"]).getTypeDigests("DIST")
- elif digests is None:
+ elif digests is None or skip_manifest:
# no digests because fetch was not called for a specific package
mydigests = {}
else: