Add a deprecation warning for the unused justmanifest parameter of
authorZac Medico <zmedico@gentoo.org>
Sat, 21 Aug 2010 13:38:59 +0000 (06:38 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 21 Aug 2010 13:38:59 +0000 (06:38 -0700)
digestcheck().

pym/portage/package/ebuild/digestcheck.py

index 6861e3f9dc4c83d0b7695d41bf6975e35305d4d6..c2c2beff362d2b2c383c55bf3de55f755ea49781 100644 (file)
@@ -3,6 +3,8 @@
 
 __all__ = ['digestcheck']
 
+import warnings
+
 from portage import os, _encodings, _unicode_decode
 from portage.exception import DigestException, FileNotFound
 from portage.localization import _
@@ -10,12 +12,20 @@ from portage.manifest import Manifest
 from portage.output import EOutput
 from portage.util import writemsg
 
-def digestcheck(myfiles, mysettings, strict=0, justmanifest=0):
+def digestcheck(myfiles, mysettings, strict=False, justmanifest=None):
        """
        Verifies checksums. Assumes all files have been downloaded.
        @rtype: int
        @returns: 1 on success and 0 on failure
        """
+
+       if justmanifest is not None:
+               warnings.warn("The justmanifest parameter of the " + \
+                       "portage.package.ebuild.digestcheck.digestcheck()" + \
+                       " function is now unused.",
+                       DeprecationWarning, stacklevel=2)
+               justmanifest = None
+
        if mysettings.get("EBUILD_SKIP_MANIFEST") == "1":
                return 1
        pkgdir = mysettings["O"]