Replace finddigest usage with Manifest2 compatible code.
authorZac Medico <zmedico@gentoo.org>
Mon, 24 Apr 2006 11:29:04 +0000 (11:29 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 24 Apr 2006 11:29:04 +0000 (11:29 -0000)
svn path=/main/trunk/; revision=3211

pym/portage.py

index dbaad406ccd1658604520cf5fe25577749006ca3..a707acd56ab8b486ef9ab59a7e63af1baa1e11f6 100644 (file)
@@ -4784,8 +4784,10 @@ class portdbapi(dbapi):
 
        def getfetchsizes(self,mypkg,useflags=None,debug=0):
                # returns a filename:size dictionnary of remaining downloads
-               mydigest=self.finddigest(mypkg)
-               checksums=digestParseFile(mydigest)
+               myebuild = self.findname(mypkg)
+               pkgdir = os.path.dirname(myebuild)
+               mf = Manifest(pkgdir, FetchlistDict(pkgdir, self.mysettings), self.mysettings["DISTDIR"])
+               checksums = mf.getDigests()
                if not checksums:
                        if debug: print "[empty/missing/bad digest]: "+mypkg
                        return None
@@ -4825,8 +4827,10 @@ class portdbapi(dbapi):
                        if mysettings:
                                useflags = mysettings["USE"].split()
                myuri, myfiles = self.getfetchlist(mypkg, useflags=useflags, mysettings=mysettings, all=all)
-               mydigest       = self.finddigest(mypkg)
-               mysums         = digestParseFile(mydigest)
+               myebuild = self.findname(mypkg)
+               pkgdir = os.path.dirname(myebuild)
+               mf = Manifest(pkgdir, FetchlistDict(pkgdir, self.mysettings), self.mysettings["DISTDIR"])
+               mysums = mf.getDigests()
 
                failures = {}
                for x in myfiles: