diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-12-02 05:20:55 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-12-02 05:20:55 +0000 |
commit | 583bc978ad61f663719dd532b08feb4f6b4a0545 (patch) | |
tree | 7fed5df6b9eb734639cb36467c4509e65ab354d6 | |
parent | eabd4140a9a273a0ac99dec2f19b808b8379736c (diff) | |
download | portage-583bc978ad61f663719dd532b08feb4f6b4a0545.tar.gz portage-583bc978ad61f663719dd532b08feb4f6b4a0545.tar.bz2 portage-583bc978ad61f663719dd532b08feb4f6b4a0545.zip |
For manifest and digest phases, use a global variable to temporarily exempt the depend phase from manifest checks (in cache regeneration is triggered).
svn path=/main/trunk/; revision=5151
-rw-r--r-- | pym/portage.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py index e04fafebf..e7bb8d5b4 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -2971,6 +2971,8 @@ def prepare_build_dirs(myroot, mysettings, cleanup): (mysettings["CATEGORY"], mysettings["PF"], logid_time)) del logid_path, logid_time +_doebuild_manifest_exempt_depend = False + def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, fetchonly=0, cleanup=0, dbkey=None, use_cache=1, fetchall=0, tree=None, mydbapi=None, vartree=None, prev_mtimes=None): @@ -3007,7 +3009,15 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, noiselevel=-1) return 1 - if "strict" in features and mydo not in ("digest", "manifest", "help"): + global _doebuild_manifest_exempt_depend + if mydo in ("digest", "manifest"): + # Temporarily exempt the depend phase from manifest checks, in case + # aux_get calls inside doebuild_environment() trigger cache generation. + _doebuild_manifest_exempt_depend = True + + if "strict" in features and \ + mydo not in ("digest", "manifest", "help") and \ + not _doebuild_manifest_exempt_depend: # Always verify the ebuild checksums before executing it. pkgdir = os.path.dirname(myebuild) manifest_path = os.path.join(pkgdir, "Manifest") @@ -3033,6 +3043,11 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, mydbapi) + if mydo in ("digest", "manifest"): + # If necessary, depend phase has been triggered by doebuild_environment + # and the exemption is no longer needed. + _doebuild_manifest_exempt_depend = False + # get possible slot information from the deps file if mydo=="depend": if mysettings.has_key("PORTAGE_DEBUG") and mysettings["PORTAGE_DEBUG"]=="1": |