From ce9606b6e628239d3fe3323f7ed143e831d6d0f1 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 28 Jul 2006 18:57:44 +0000 Subject: [PATCH] Use the FetchlistDict to simplify code. svn path=/main/trunk/; revision=4046 --- bin/ebuild | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/ebuild b/bin/ebuild index 398e08283..e6819b9da 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -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] -- 2.26.2