From d85b7e5ceb8a1585b8b8a8e4383dc6de5450e616 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 13 Jul 2011 17:56:57 -0700 Subject: [PATCH] debuild: pass dist digests to fetch() This allows us to avoid parsing the Manifest twice. --- pym/portage/package/ebuild/doebuild.py | 7 ++++++- pym/portage/package/ebuild/fetch.py | 2 +- 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: -- 2.26.2