From: Fabian Groffen Date: Sun, 7 Jan 2007 10:49:57 +0000 (-0000) Subject: Merged from trunk 5476:5478 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=6eb1700a6f7ab51051e628ef3f79a8e2777920cd;p=portage.git Merged from trunk 5476:5478 Fix the digestentry.unused check so that it works properly when old-style files/digest-* don't exist. Don't swallow an IOError if it is thrown from the aux_get call in portdbapi.getfetchlist(). svn path=/main/branches/prefix/; revision=5479 --- diff --git a/bin/repoman b/bin/repoman index d28fd2849..a8cf1d78b 100755 --- a/bin/repoman +++ b/bin/repoman @@ -937,7 +937,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") @@ -973,7 +972,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: @@ -1038,11 +1036,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 diff --git a/pym/portage.py b/pym/portage.py index cdac6bda0..3cff4dc9f 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -5729,7 +5729,7 @@ class portdbapi(dbapi): mysettings = self.mysettings try: myuris = self.aux_get(mypkg, ["SRC_URI"], mytree=mytree)[0] - except (IOError,KeyError): + except KeyError: print red("getfetchlist():")+" aux_get() error reading "+mypkg+"; aborting." sys.exit(1)