Bug #225285 - Allow digestcheck() to succeed when the Manifest is empty and
authorZac Medico <zmedico@gentoo.org>
Tue, 10 Jun 2008 04:13:24 +0000 (04:13 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 10 Jun 2008 04:13:24 +0000 (04:13 -0000)
strict mode is disabled.

svn path=/main/trunk/; revision=10636

pym/portage/__init__.py

index d4ad4b3ff93ed0be4c986b4faf926b31875b054f..8b0f98d4ec7c69d508045310e890b41b15d68089 100644 (file)
@@ -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: