summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-03-27 16:49:02 +0000
committerZac Medico <zmedico@gentoo.org>2008-03-27 16:49:02 +0000
commit37ff5f15b700a9ad4475e1a9e3e212814d5fb88d (patch)
tree93986d7833c524d0ffbd5a0b258a6374499a03ba
parentab870b3a0fcae04d4e5e10ea0d17ed30701ed373 (diff)
downloadportage-37ff5f15b700a9ad4475e1a9e3e212814d5fb88d.tar.gz
portage-37ff5f15b700a9ad4475e1a9e3e212814d5fb88d.tar.bz2
portage-37ff5f15b700a9ad4475e1a9e3e212814d5fb88d.zip
Bug #214879 - Fix FEATURES=-strict behavior so that distfiles digests are
always checked. svn path=/main/trunk/; revision=9519
-rw-r--r--man/make.conf.52
-rw-r--r--pym/portage/__init__.py29
2 files changed, 16 insertions, 15 deletions
diff --git a/man/make.conf.5 b/man/make.conf.5
index 952d7079e..ab612b741 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -272,7 +272,7 @@ stored for later use by various debuggers. This feature is disabled by
.TP
.B strict
Have portage react strongly to conditions that have the potential to be
-dangerous (like missing or incorrect digests for ebuilds or distfiles).
+dangerous (like missing or incorrect digests for ebuilds).
.TP
.B stricter
Have portage react strongly to conditions that may conflict with system
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 6fe3d6a82..42318409b 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -3098,7 +3098,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 and "strict" in features:
+ if pkgdir is not None:
mydigests = Manifest(
pkgdir, mysettings["DISTDIR"]).getTypeDigests("DIST")
else:
@@ -3744,8 +3744,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):
@@ -3757,15 +3755,16 @@ def digestcheck(myfiles, mysettings, strict=0, justmanifest=0):
eout = portage.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)
@@ -3792,7 +3791,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")
@@ -3808,7 +3808,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