For `ebuild --force digest`, exempt the depend phase from Manifest checks.
authorZac Medico <zmedico@gentoo.org>
Mon, 4 Dec 2006 01:55:29 +0000 (01:55 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 4 Dec 2006 01:55:29 +0000 (01:55 -0000)
svn path=/main/trunk/; revision=5169

bin/ebuild

index da405db07be1c30029ec46943301a4f1a69d5028..0860f089b5f983774e683a9af7c12ea9a0ac090c 100755 (executable)
@@ -88,22 +88,26 @@ def discard_digests(myebuild, mysettings, mydbapi):
        upstream has changed the identity of the distfiles and the user would
        otherwise have to manually remove the Manifest and files/digest-* files in
        order to ensure correct results."""
-       pkgdir = os.path.dirname(myebuild)
-       fetchlist_dict = portage.FetchlistDict(pkgdir, mysettings, mydbapi)
-       cat, pkg = pkgdir.split(os.sep)[-2:]
-       cpv = cat + "/" + os.path.basename(myebuild)[:-7]
-       from portage_manifest import Manifest
-       mf = Manifest(pkgdir, mysettings["DISTDIR"],
-               fetchlist_dict=fetchlist_dict)
-       mf.create(requiredDistfiles=None,
-               assumeDistHashesSometimes=True, assumeDistHashesAlways=True)
-       distfiles = fetchlist_dict[cpv]
-       for myfile in distfiles:
-               try:
-                       del mf.fhashdict["DIST"][myfile]
-               except KeyError:
-                       pass
-       mf.write()
+       try:
+               portage._doebuild_manifest_exempt_depend += 1
+               pkgdir = os.path.dirname(myebuild)
+               fetchlist_dict = portage.FetchlistDict(pkgdir, mysettings, mydbapi)
+               cat, pkg = pkgdir.split(os.sep)[-2:]
+               cpv = cat + "/" + os.path.basename(myebuild)[:-7]
+               from portage_manifest import Manifest
+               mf = Manifest(pkgdir, mysettings["DISTDIR"],
+                       fetchlist_dict=fetchlist_dict)
+               mf.create(requiredDistfiles=None,
+                       assumeDistHashesSometimes=True, assumeDistHashesAlways=True)
+               distfiles = fetchlist_dict[cpv]
+               for myfile in distfiles:
+                       try:
+                               del mf.fhashdict["DIST"][myfile]
+                       except KeyError:
+                               pass
+               mf.write()
+       finally:
+               portage._doebuild_manifest_exempt_depend -= 1
 
 for arg in pargs:
        try: