From: Zac Medico Date: Thu, 14 Jul 2011 00:56:57 +0000 (-0700) Subject: debuild: pass dist digests to fetch() X-Git-Tag: v2.2.0_alpha45~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d85b7e5ceb8a1585b8b8a8e4383dc6de5450e616;p=portage.git debuild: pass dist digests to fetch() This allows us to avoid parsing the Manifest twice. --- 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: