Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9658 - main/trunk/pym/portage
Date: Tue, 01 Apr 2008 00:33:39
Message-Id: E1JgURU-0003i6-BK@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-04-01 00:33:35 +0000 (Tue, 01 Apr 2008)
3 New Revision: 9658
4
5 Modified:
6 main/trunk/pym/portage/__init__.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.
10
11
12 Modified: main/trunk/pym/portage/__init__.py
13 ===================================================================
14 --- main/trunk/pym/portage/__init__.py 2008-03-31 23:53:14 UTC (rev 9657)
15 +++ main/trunk/pym/portage/__init__.py 2008-04-01 00:33:35 UTC (rev 9658)
16 @@ -4305,6 +4305,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 @@ -4413,13 +4414,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 @@ -4427,6 +4431,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 @@ -4434,6 +4439,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 @@ -4442,6 +4448,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