diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-03-28 12:49:25 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-03-28 12:49:25 +0000 |
commit | b4ec5574c3ffc6aa9a6fb214b166977e6651495b (patch) | |
tree | 6d6d8e72f7c6ade753bda94c61193357685e5543 /pym/portage.py | |
parent | 6bf6b9ccf3804d41f7f0fb7aa5fb2efddb8d02a9 (diff) | |
download | portage-b4ec5574c3ffc6aa9a6fb214b166977e6651495b.tar.gz portage-b4ec5574c3ffc6aa9a6fb214b166977e6651495b.tar.bz2 portage-b4ec5574c3ffc6aa9a6fb214b166977e6651495b.zip |
Bug #214879 - Fix FEATURES=-strict behavior so that distfiles digests are
always checked. (trunk r9519)
svn path=/main/branches/2.1.2/; revision=9572
Diffstat (limited to 'pym/portage.py')
-rw-r--r-- | pym/portage.py | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/pym/portage.py b/pym/portage.py index d0271c822..ecb391b64 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -3074,7 +3074,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks", mymirrors += [x.rstrip("/") for x in mysettings["GENTOO_MIRRORS"].split() if x] pkgdir = mysettings.get("O") - if pkgdir: + if pkgdir is not None: mydigests = Manifest( pkgdir, mysettings["DISTDIR"]).getTypeDigests("DIST") else: @@ -3720,8 +3720,6 @@ def digestcheck(myfiles, mysettings, strict=0, justmanifest=0): """Verifies checksums. Assumes all files have been downloaded. DEPRECATED: this is now only a compability wrapper for portage_manifest.Manifest().""" - if not strict: - return 1 pkgdir = mysettings["O"] manifest_path = os.path.join(pkgdir, "Manifest") if not os.path.exists(manifest_path): @@ -3733,15 +3731,16 @@ def digestcheck(myfiles, mysettings, strict=0, justmanifest=0): eout = output.EOutput() eout.quiet = mysettings.get("PORTAGE_QUIET", None) == "1" try: - eout.ebegin("checking ebuild checksums ;-)") - mf.checkTypeHashes("EBUILD") - eout.eend(0) - eout.ebegin("checking auxfile checksums ;-)") - mf.checkTypeHashes("AUX") - eout.eend(0) - eout.ebegin("checking miscfile checksums ;-)") - mf.checkTypeHashes("MISC", ignoreMissingFiles=True) - eout.eend(0) + if strict: + eout.ebegin("checking ebuild checksums ;-)") + mf.checkTypeHashes("EBUILD") + eout.eend(0) + eout.ebegin("checking auxfile checksums ;-)") + mf.checkTypeHashes("AUX") + eout.eend(0) + eout.ebegin("checking miscfile checksums ;-)") + mf.checkTypeHashes("MISC", ignoreMissingFiles=True) + eout.eend(0) for f in myfiles: eout.ebegin("checking %s ;-)" % f) mf.checkFileHashes(mf.findFile(f), f) @@ -3768,7 +3767,8 @@ def digestcheck(myfiles, mysettings, strict=0, justmanifest=0): if f.endswith(".ebuild") and not mf.hasFile("EBUILD", f): writemsg("!!! A file is not listed in the Manifest: '%s'\n" % \ os.path.join(pkgdir, f), noiselevel=-1) - return 0 + if strict: + return 0 """ epatch will just grab all the patches out of a directory, so we have to make sure there aren't any foreign files that it might grab.""" filesdir = os.path.join(pkgdir, "files") @@ -3784,7 +3784,8 @@ def digestcheck(myfiles, mysettings, strict=0, justmanifest=0): if file_type != "AUX" and not f.startswith("digest-"): writemsg("!!! A file is not listed in the Manifest: '%s'\n" % \ os.path.join(filesdir, f), noiselevel=-1) - return 0 + if strict: + return 0 return 1 # parse actionmap to spawn ebuild with the appropriate args |