summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-01 00:33:35 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-01 00:33:35 +0000
commit350cdd0ec9ece7c0fe8c966353db7af625313830 (patch)
tree094ead03c0e14ae51b7210d1b83e34b9a7feb52e
parentaf8d8869563e839c54a21611b144c85048370c9a (diff)
downloadportage-350cdd0ec9ece7c0fe8c966353db7af625313830.tar.gz
portage-350cdd0ec9ece7c0fe8c966353db7af625313830.tar.bz2
portage-350cdd0ec9ece7c0fe8c966353db7af625313830.zip
Bug #215308 - Cache the paths of known bad manifests to ensure that the
same broken manifest is never checked twice. svn path=/main/trunk/; revision=9658
-rw-r--r--pym/portage/__init__.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 9407d2a90..7364127b3 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -4305,6 +4305,7 @@ def _doebuild_exit_status_unlink(exit_status_file):
_doebuild_manifest_exempt_depend = 0
_doebuild_manifest_checked = None
+_doebuild_broken_manifests = set()
def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
fetchonly=0, cleanup=0, dbkey=None, use_cache=1, fetchall=0, tree=None,
@@ -4413,13 +4414,16 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
# Always verify the ebuild checksums before executing it.
pkgdir = os.path.dirname(myebuild)
manifest_path = os.path.join(pkgdir, "Manifest")
- global _doebuild_manifest_checked
+ global _doebuild_manifest_checked, _doebuild_broken_manifests
+ if manifest_path in _doebuild_broken_manifests:
+ return 1
# Avoid checking the same Manifest several times in a row during a
# regen with an empty cache.
if _doebuild_manifest_checked != manifest_path:
if not os.path.exists(manifest_path):
writemsg("!!! Manifest file not found: '%s'\n" % manifest_path,
noiselevel=-1)
+ _doebuild_broken_manifests.add(manifest_path)
return 1
mf = Manifest(pkgdir, mysettings["DISTDIR"])
try:
@@ -4427,6 +4431,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
except portage.exception.FileNotFound, e:
writemsg("!!! A file listed in the Manifest " + \
"could not be found: %s\n" % str(e), noiselevel=-1)
+ _doebuild_broken_manifests.add(manifest_path)
return 1
except portage.exception.DigestException, e:
writemsg("!!! Digest verification failed:\n", noiselevel=-1)
@@ -4434,6 +4439,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
writemsg("!!! Reason: %s\n" % e.value[1], noiselevel=-1)
writemsg("!!! Got: %s\n" % e.value[2], noiselevel=-1)
writemsg("!!! Expected: %s\n" % e.value[3], noiselevel=-1)
+ _doebuild_broken_manifests.add(manifest_path)
return 1
# Make sure that all of the ebuilds are actually listed in the
# Manifest.
@@ -4442,6 +4448,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
writemsg("!!! A file is not listed in the " + \
"Manifest: '%s'\n" % os.path.join(pkgdir, f),
noiselevel=-1)
+ _doebuild_broken_manifests.add(manifest_path)
return 1
_doebuild_manifest_checked = manifest_path