summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-03-24 22:44:28 +0000
committerZac Medico <zmedico@gentoo.org>2007-03-24 22:44:28 +0000
commit9ee0a04335c782e20cbbcbece1f70149ce7c57a1 (patch)
treecbdccb2b70ca3a903f3fc5d293a96b27271ae3fe
parentf798fc3d48328a3f1847e0207444794549e8bb49 (diff)
downloadportage-9ee0a04335c782e20cbbcbece1f70149ce7c57a1.tar.gz
portage-9ee0a04335c782e20cbbcbece1f70149ce7c57a1.tar.bz2
portage-9ee0a04335c782e20cbbcbece1f70149ce7c57a1.zip
Verify all ebuild manifests before building anything now so that the user is notified of failure as soon as possible.
svn path=/main/trunk/; revision=6277
-rw-r--r--pym/emerge/__init__.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index 495019d7c..e5619679f 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -2933,6 +2933,35 @@ class MergeTask(object):
show_blocker_docs_link()
return 1
+ # Verify all the manifests now so that the user is notified of failure
+ # as soon as possible.
+ if "--fetchonly" not in self.myopts and \
+ "--fetch-all-uri" not in self.myopts and \
+ len(mylist) > 1 and \
+ "strict" in self.settings.features:
+ shown_verifying_msg = False
+ quiet_settings = {}
+ for myroot, pkgsettings in self.pkgsettings.iteritems():
+ quiet_config = portage.config(clone=pkgsettings)
+ quiet_config["PORTAGE_QUIET"] = "1"
+ quiet_config.backup_changes("PORTAGE_QUIET")
+ quiet_settings[myroot] = quiet_config
+ del quiet_config
+ for x in mylist:
+ if x[0] != "ebuild" or x[-1] == "nomerge":
+ continue
+ if not shown_verifying_msg:
+ shown_verifying_msg = True
+ print ">>> Verifying ebuild Manifests..."
+ mytype, myroot, mycpv, mystatus = x
+ portdb = self.trees[myroot]["porttree"].dbapi
+ quiet_config = quiet_settings[myroot]
+ quiet_config["O"] = os.path.dirname(portdb.findname(mycpv))
+ if not portage.digestcheck([], quiet_config, strict=True):
+ return 1
+ del x, mytype, myroot, mycpv, mystatus, quiet_config
+ del shown_verifying_msg, quiet_settings
+
#buildsyspkg: I need mysysdict also on resume (moved from the else block)
mysysdict = genericdict(getlist(self.settings, "system"))
if "--resume" in self.myopts: