From e2992bf17858032c41f60d1936e44b2f899ed267 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 6 Jul 2011 21:35:45 -0700 Subject: digestcheck: support allow-missing-manifests Also, update the man page. --- man/make.conf.5 | 4 ++++ pym/portage/package/ebuild/digestcheck.py | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/man/make.conf.5 b/man/make.conf.5 index 92a29d7c8..5206f2e88 100644 --- a/man/make.conf.5 +++ b/man/make.conf.5 @@ -198,6 +198,10 @@ non-developers as well. The \fBsandbox\fR feature is very important and should not be disabled by default. .RS .TP +.B allow\-missing\-manifests +Allow missing manifest entries. This primarily useful for temporary +trees or instances where manifests aren't used. +.TP .B assume\-digests When commiting work to cvs with \fBrepoman\fR(1), assume that all existing SRC_URI digests are correct. This feature also affects digest generation via diff --git a/pym/portage/package/ebuild/digestcheck.py b/pym/portage/package/ebuild/digestcheck.py index 68ce1f565..e4432f186 100644 --- a/pym/portage/package/ebuild/digestcheck.py +++ b/pym/portage/package/ebuild/digestcheck.py @@ -28,6 +28,7 @@ def digestcheck(myfiles, mysettings, strict=False, justmanifest=None): if mysettings.get("EBUILD_SKIP_MANIFEST") == "1": return 1 + allow_missing = "allow-missing-manifests" in mysettings.features pkgdir = mysettings["O"] manifest_path = os.path.join(pkgdir, "Manifest") if not os.path.exists(manifest_path): @@ -86,6 +87,10 @@ def digestcheck(myfiles, mysettings, strict=False, justmanifest=None): writemsg(_("!!! Got: %s\n") % e.value[2], noiselevel=-1) writemsg(_("!!! Expected: %s\n") % e.value[3], noiselevel=-1) return 0 + if allow_missing: + # In this case we ignore any missing digests that + # would otherwise be detected below. + return 1 # Make sure that all of the ebuilds are actually listed in the Manifest. for f in os.listdir(pkgdir): pf = None @@ -96,8 +101,8 @@ def digestcheck(myfiles, mysettings, strict=False, justmanifest=None): os.path.join(pkgdir, f), noiselevel=-1) 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.""" + # 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") for parent, dirs, files in os.walk(filesdir): -- cgit v1.2.3-1-g7c22