public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [gentoo-commits] portage r9659 - main/branches/2.1.2/pym
@ 2008-04-01  0:36 99% Zac Medico (zmedico)
  0 siblings, 0 replies; 1+ results
From: Zac Medico (zmedico) @ 2008-04-01  0:36 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-04-01 00:36:52 +0000 (Tue, 01 Apr 2008)
New Revision: 9659

Modified:
   main/branches/2.1.2/pym/portage.py
Log:
Bug #215308 - Cache the paths of known bad manifests to ensure that the
same broken manifest is never checked twice. (trunk r9658)


Modified: main/branches/2.1.2/pym/portage.py
===================================================================
--- main/branches/2.1.2/pym/portage.py	2008-04-01 00:33:35 UTC (rev 9658)
+++ main/branches/2.1.2/pym/portage.py	2008-04-01 00:36:52 UTC (rev 9659)
@@ -4280,6 +4280,7 @@
 
 _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,
@@ -4388,13 +4389,16 @@
 		# 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:
@@ -4402,6 +4406,7 @@
 			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)
@@ -4409,6 +4414,7 @@
 				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.
@@ -4417,6 +4423,7 @@
 					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
 

-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2008-04-01  0:36 99% [gentoo-commits] portage r9659 - main/branches/2.1.2/pym Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox