summaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-06-10 04:13:24 +0000
committerZac Medico <zmedico@gentoo.org>2008-06-10 04:13:24 +0000
commit22b7caabee6f266794be94d336510bbc07e9d5bc (patch)
tree5979fba68ede08574c3f56061c573dce1728b9c5 /pym
parentAdd some sanity checks and error tolerance in the owners cache. (diff)
downloadportage-multirepo-22b7caabee6f266794be94d336510bbc07e9d5bc.tar.gz
portage-multirepo-22b7caabee6f266794be94d336510bbc07e9d5bc.tar.bz2
portage-multirepo-22b7caabee6f266794be94d336510bbc07e9d5bc.zip
Bug #225285 - Allow digestcheck() to succeed when the Manifest is empty and
strict mode is disabled. svn path=/main/trunk/; revision=10636
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index d4ad4b3f..8b0f98d4 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -4052,6 +4052,18 @@ def digestcheck(myfiles, mysettings, strict=0, justmanifest=0):
else:
return 1
mf = Manifest(pkgdir, mysettings["DISTDIR"])
+ manifest_empty = True
+ for d in mf.fhashdict.itervalues():
+ if d:
+ manifest_empty = False
+ break
+ if manifest_empty:
+ writemsg("!!! Manifest is empty: '%s'\n" % manifest_path,
+ noiselevel=-1)
+ if strict:
+ return 0
+ else:
+ return 1
eout = portage.output.EOutput()
eout.quiet = mysettings.get("PORTAGE_QUIET", None) == "1"
try: