diff options
author | Marius Mauch <genone@gentoo.org> | 2005-12-19 23:58:17 +0000 |
---|---|---|
committer | Marius Mauch <genone@gentoo.org> | 2005-12-19 23:58:17 +0000 |
commit | 9761fe7db6fcf0c15ff9b740d6d1ca57b46a2896 (patch) | |
tree | f18f91c662470e3175e5e2dcd1caee88836a33e4 /pym/portage.py | |
parent | cd3e3775966a9f58aebb91f58cbdb5903faad3de (diff) | |
download | portage-9761fe7db6fcf0c15ff9b740d6d1ca57b46a2896.tar.gz portage-9761fe7db6fcf0c15ff9b740d6d1ca57b46a2896.tar.bz2 portage-9761fe7db6fcf0c15ff9b740d6d1ca57b46a2896.zip |
Make digest errors more verbose
svn path=/main/trunk/; revision=2412
Diffstat (limited to 'pym/portage.py')
-rw-r--r-- | pym/portage.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/pym/portage.py b/pym/portage.py index a5295f21e..4c9a0a04e 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1920,7 +1920,11 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks", # Verify checksums at each fetch for fetchonly. verified_ok,reason = portage_checksum.verify_all(mysettings["DISTDIR"]+"/"+myfile, mydigests[myfile]) if not verified_ok: - writemsg("!!! Previously fetched file: "+str(myfile)+"\n!!! Reason: "+reason+"\nRefetching...\n\n") + writemsg("!!! Previously fetched file: "+str(myfile)+"\n") + writemsg("!!! Reason: "+reason[0]+"\n") + writemsg("!!! Got: "+reason[1]+"\n") + writemsg("!!! Expected: "+reason[2]+"\n") + writemsg("Refetching...\n\n") os.unlink(mysettings["DISTDIR"]+"/"+myfile) fetched=0 else: @@ -2019,7 +2023,11 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks", # from another mirror... verified_ok,reason = portage_checksum.verify_all(mysettings["DISTDIR"]+"/"+myfile, mydigests[myfile]) if not verified_ok: - writemsg("!!! Fetched file: "+str(myfile)+" VERIFY FAILED!\n!!! Reason: "+reason+"\nRemoving corrupt distfile...\n") + writemsg("!!! Fetched file: "+str(myfile)+" VERIFY FAILED!\n") + writemsg("!!! Reason: "+reason[0]+"\n") + writemsg("!!! Got: "+reason[1]+"\n") + writemsg("!!! Expected: "+reason[2]+"\n") + writemsg("Removing corrupt distfile...\n") os.unlink(mysettings["DISTDIR"]+"/"+myfile) fetched=0 else: @@ -2273,7 +2281,9 @@ def digestCheckFiles(myfiles, mydigests, basedir, note="", strict=0): print print red("!!! Digest verification Failed:") print red("!!!")+" "+str(myfile) - print red("!!! Reason: ")+reason + print red("!!! Reason: ")+reason[0] + print red("!!! Got: ")+reason[1] + print red("!!! Expected: ")+reason[2] print return 0 else: |