From 07f9e3e8637b4b8749cb584fd623c146d10fe214 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 6 Jan 2007 22:39:23 +0000 Subject: [PATCH] Fix the digestentry.unused check so that it works properly when old-style files/digest-* don't exist. svn path=/main/trunk/; revision=5477 --- bin/repoman | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/repoman b/bin/repoman index 88b101bb9..60aa4d9d8 100755 --- a/bin/repoman +++ b/bin/repoman @@ -822,7 +822,6 @@ for x in scanlist: mf = Manifest(checkdir, repoman_settings["DISTDIR"]) mydigests=mf.getTypeDigests("DIST") - myfiles_all = [] if os.path.exists(checkdir+"/files"): filesdirlist=os.listdir(checkdir+"/files") @@ -854,7 +853,6 @@ for x in scanlist: else: # We have an ebuild myuris, myfiles = portdb.getfetchlist(mykey, all=True) - myfiles_all.extend(myfiles) uri_dict = {} for myu in myuris: @@ -919,11 +917,18 @@ for x in scanlist: fails["file.name"].append("%s/files/%s: char '%s'" % (checkdir, y, c)) break - for entry in mydigests.keys(): + fetchlist_dict = portage.FetchlistDict(checkdir, repoman_settings, portdb) + myfiles_all = [] + for myfiles in fetchlist_dict.itervalues(): + myfiles_all.extend(myfiles) + del myfiles + del fetchlist_dict + myfiles_all = set(myfiles_all) + for entry in mydigests: if entry not in myfiles_all: stats["digestentry.unused"] += 1 fails["digestentry.unused"].append(checkdir+"::"+entry) - + del mydigests, myfiles_all if "ChangeLog" not in checkdirlist: stats["changelog.missing"]+=1 -- 2.26.2