summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-06-04 15:33:21 +0000
committerZac Medico <zmedico@gentoo.org>2006-06-04 15:33:21 +0000
commit0c2a41854f75112aeb6fe88c4904094188383602 (patch)
tree551b07f5108c30568046d871579beb157d551d6b
parente99df8c3192237de411757b8bc32a3fc0a117048 (diff)
downloadportage-0c2a41854f75112aeb6fe88c4904094188383602.tar.gz
portage-0c2a41854f75112aeb6fe88c4904094188383602.tar.bz2
portage-0c2a41854f75112aeb6fe88c4904094188383602.zip
When generating digests, print a digest.assumed QA warning if necessary in order to prevent confusion. Thanks to jakub for suggesting this.
svn path=/main/trunk/; revision=3456
-rw-r--r--pym/portage.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py
index deaad848f..3ac06617a 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -2320,7 +2320,7 @@ def digestgen(myarchives, mysettings, overwrite=1, manifestonly=0, myportdb=None
myportdb = portdb
mf = Manifest(mysettings["O"], mysettings["DISTDIR"],
fetchlist_dict=FetchlistDict(mysettings["O"], mysettings, myportdb))
- writemsg(">>> Creating Manifest for %s\n" % mysettings["O"])
+ writemsg_stdout(">>> Creating Manifest for %s\n" % mysettings["O"])
try:
mf.create(requiredDistfiles=myarchives, assumeDistHashesSometimes=True,
assumeDistHashesAlways=("assume-digests" in mysettings.features))
@@ -2329,6 +2329,28 @@ def digestgen(myarchives, mysettings, overwrite=1, manifestonly=0, myportdb=None
noiselevel=-1)
return 0
mf.write(sign=False)
+ if "assume-digests" not in mysettings.features:
+ distlist = mf.fhashdict.get("DIST", {}).keys()
+ distlist.sort()
+ auto_assumed = []
+ for filename in distlist:
+ if not os.path.exists(os.path.join(mysettings["DISTDIR"], filename)):
+ auto_assumed.append(filename)
+ if auto_assumed:
+ mytree = os.path.realpath(
+ os.path.dirname(os.path.dirname(mysettings["O"])))
+ cp = os.path.sep.join(mysettings["O"].split(os.path.sep)[-2:])
+ pkgs = myportdb.cp_list(cp, mytree=mytree)
+ pkgs.sort()
+ writemsg_stdout(" digest.assumed" + \
+ output.colorize("WARN", str(len(auto_assumed)).rjust(18)) + "\n")
+ for pkg_key in pkgs:
+ fetchlist = myportdb.getfetchlist(pkg_key,
+ mysettings=mysettings, all=True, mytree=mytree)[1]
+ pv = pkg_key.split("/")[1]
+ for filename in auto_assumed:
+ if filename in fetchlist:
+ writemsg_stdout(" digest-%s::%s\n" % (pv, filename))
return 1
def digestParseFile(myfilename, mysettings=None):