Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9659 - main/branches/2.1.2/pym
Date: Tue, 01 Apr 2008 00:36:56
Message-Id: E1JgUUf-0003jE-J7@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-04-01 00:36:52 +0000 (Tue, 01 Apr 2008)
3 New Revision: 9659
4
5 Modified:
6 main/branches/2.1.2/pym/portage.py
7 Log:
8 Bug #215308 - Cache the paths of known bad manifests to ensure that the
9 same broken manifest is never checked twice. (trunk r9658)
10
11
12 Modified: main/branches/2.1.2/pym/portage.py
13 ===================================================================
14 --- main/branches/2.1.2/pym/portage.py 2008-04-01 00:33:35 UTC (rev 9658)
15 +++ main/branches/2.1.2/pym/portage.py 2008-04-01 00:36:52 UTC (rev 9659)
16 @@ -4280,6 +4280,7 @@
17
18 _doebuild_manifest_exempt_depend = 0
19 _doebuild_manifest_checked = None
20 +_doebuild_broken_manifests = set()
21
22 def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
23 fetchonly=0, cleanup=0, dbkey=None, use_cache=1, fetchall=0, tree=None,
24 @@ -4388,13 +4389,16 @@
25 # Always verify the ebuild checksums before executing it.
26 pkgdir = os.path.dirname(myebuild)
27 manifest_path = os.path.join(pkgdir, "Manifest")
28 - global _doebuild_manifest_checked
29 + global _doebuild_manifest_checked, _doebuild_broken_manifests
30 + if manifest_path in _doebuild_broken_manifests:
31 + return 1
32 # Avoid checking the same Manifest several times in a row during a
33 # regen with an empty cache.
34 if _doebuild_manifest_checked != manifest_path:
35 if not os.path.exists(manifest_path):
36 writemsg("!!! Manifest file not found: '%s'\n" % manifest_path,
37 noiselevel=-1)
38 + _doebuild_broken_manifests.add(manifest_path)
39 return 1
40 mf = Manifest(pkgdir, mysettings["DISTDIR"])
41 try:
42 @@ -4402,6 +4406,7 @@
43 except portage_exception.FileNotFound, e:
44 writemsg("!!! A file listed in the Manifest " + \
45 "could not be found: %s\n" % str(e), noiselevel=-1)
46 + _doebuild_broken_manifests.add(manifest_path)
47 return 1
48 except portage_exception.DigestException, e:
49 writemsg("!!! Digest verification failed:\n", noiselevel=-1)
50 @@ -4409,6 +4414,7 @@
51 writemsg("!!! Reason: %s\n" % e.value[1], noiselevel=-1)
52 writemsg("!!! Got: %s\n" % e.value[2], noiselevel=-1)
53 writemsg("!!! Expected: %s\n" % e.value[3], noiselevel=-1)
54 + _doebuild_broken_manifests.add(manifest_path)
55 return 1
56 # Make sure that all of the ebuilds are actually listed in the
57 # Manifest.
58 @@ -4417,6 +4423,7 @@
59 writemsg("!!! A file is not listed in the " + \
60 "Manifest: '%s'\n" % os.path.join(pkgdir, f),
61 noiselevel=-1)
62 + _doebuild_broken_manifests.add(manifest_path)
63 return 1
64 _doebuild_manifest_checked = manifest_path
65
66
67 --
68 gentoo-commits@l.g.o mailing list