From 3ef8c6befc4b5a32426f85dd103663d703aac063 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 24 Apr 2006 11:29:04 +0000 Subject: [PATCH] Replace finddigest usage with Manifest2 compatible code. svn path=/main/trunk/; revision=3211 --- pym/portage.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pym/portage.py b/pym/portage.py index dbaad406c..a707acd56 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -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: -- 2.26.2