Use the FetchlistDict to simplify code.
authorZac Medico <zmedico@gentoo.org>
Fri, 28 Jul 2006 18:57:44 +0000 (18:57 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 28 Jul 2006 18:57:44 +0000 (18:57 -0000)
svn path=/main/trunk/; revision=4046

bin/ebuild

index 398e082832b0c57b6d14e901bd1556ff48439cb7..e6819b9dabd6d088d2056b129c1694a479290d9a 100755 (executable)
@@ -85,16 +85,15 @@ def discard_digests(myebuild, mysettings, mydbapi):
        otherwise have to manually remove the Manifest and files/digest-* files in
        order to ensure correct results."""
        pkgdir = os.path.dirname(myebuild)
-       mytree = os.path.realpath(os.path.dirname(os.path.dirname(pkgdir)))
+       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=portage.FetchlistDict(pkgdir, mysettings, mydbapi))
+               fetchlist_dict=fetchlist_dict)
        mf.create(requiredDistfiles=None,
                assumeDistHashesSometimes=True, assumeDistHashesAlways=True)
-       distfiles = mydbapi.getfetchlist(cpv,
-               mysettings=mysettings, all=True, mytree=mytree)[1]
+       distfiles = fetchlist_dict[cpv]
        for myfile in distfiles:
                try:
                        del mf.fhashdict["DIST"][myfile]