From 81c83f4d81716cd7485a9ea393a344e5df50a521 Mon Sep 17 00:00:00 2001 From: Marius Mauch Date: Sat, 25 Mar 2006 05:44:28 +0000 Subject: Add files/ prefix for AUX files in manifest1 entries; fix digest.unused check partially by checking all DIST entries against all SRC_URI entries of a package (instead of per ebuild checks) svn path=/main/trunk/; revision=3002 --- pym/portage_manifest.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pym/portage_manifest.py') diff --git a/pym/portage_manifest.py b/pym/portage_manifest.py index 962dbb447..a9f521ef0 100644 --- a/pym/portage_manifest.py +++ b/pym/portage_manifest.py @@ -63,6 +63,10 @@ class Manifest(object): rval.update(self.fhashdict[t]) return rval + def getTypeDigests(self, ftype): + """ Similar to getDigests(), but restricted to files of the given type. """ + return self.fhashdict[ftype] + def _readDigests(self): """ Parse old style digest files for this Manifest instance """ mycontent = "" @@ -140,6 +144,11 @@ class Manifest(object): mylines = [] for t in self.fhashdict.keys(): for f in self.fhashdict[t].keys(): + # compat hack for v1 manifests + if t == "AUX": + f2 = os.path.join("files", f) + else: + f2 = f myline = " ".join([t, f, str(self.fhashdict[t][f]["size"])]) myhashes = self.fhashdict[t][f] for h in myhashes.keys(): @@ -151,7 +160,7 @@ class Manifest(object): for h in myhashes.keys(): if h not in portage_const.MANIFEST1_HASH_FUNCTIONS: continue - mylines.append((" ".join([h, str(myhashes[h]), f, str(myhashes["size"])]))) + mylines.append((" ".join([h, str(myhashes[h]), f2, str(myhashes["size"])]))) fd.write("\n".join(mylines)) fd.write("\n") -- cgit v1.2.3-1-g7c22