summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-05-16 17:05:20 -0700
committerZac Medico <zmedico@gentoo.org>2010-05-16 17:05:20 -0700
commit258f6393a8936e4a1c97f17f0ce15c98fc8bc467 (patch)
tree6c0ba7c1073149bff74db22137cc67463a251233
parentOnly count "merge" nodes when determining whether or not to trigger (diff)
downloadportage-idfetch-258f6393a8936e4a1c97f17f0ce15c98fc8bc467.tar.gz
portage-idfetch-258f6393a8936e4a1c97f17f0ce15c98fc8bc467.tar.bz2
portage-idfetch-258f6393a8936e4a1c97f17f0ce15c98fc8bc467.zip
New mode: manifest-check - Checks Manifests for missing or incorrect digests
-rwxr-xr-xbin/repoman10
-rw-r--r--man/repoman.16
2 files changed, 16 insertions, 0 deletions
diff --git a/bin/repoman b/bin/repoman
index 7a4eafb2..14d442dc 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -150,6 +150,7 @@ def ParseArgs(args, qahelp):
'full' : 'Scan directory tree and print all issues (not a summary)',
'help' : 'Show this screen',
'manifest' : 'Generate a Manifest (fetches files if necessary)',
+ 'manifest-check' : 'Check Manifests for missing or incorrect digests',
'scan' : 'Scan directory tree for QA issues'
}
@@ -331,6 +332,7 @@ qahelp={
"ebuild.majorsyn":"This ebuild has a major syntax error that may cause the ebuild to fail partially or fully",
"ebuild.minorsyn":"This ebuild has a minor syntax error that contravenes gentoo coding style",
"ebuild.badheader":"This ebuild has a malformed header",
+ "manifest.bad":"Manifest has missing or incorrect digests",
"metadata.missing":"Missing metadata.xml files",
"metadata.bad":"Bad metadata.xml files",
"metadata.warning":"Warnings in metadata.xml files",
@@ -1000,6 +1002,14 @@ for x in scanlist:
checkdir_relative = os.path.join(catdir, checkdir_relative)
checkdir_relative = os.path.join(".", checkdir_relative)
+ if options.mode == 'manifest-check':
+ repoman_settings['O'] = checkdir
+ repoman_settings['PORTAGE_QUIET'] = '1'
+ if not portage.digestcheck([], repoman_settings, strict=1):
+ stats["manifest.bad"] += 1
+ fails["manifest.bad"].append(os.path.join(x, 'Manifest'))
+ continue
+
if options.mode == "manifest" or \
options.mode in ('commit', 'fix') and not options.pretend:
auto_assumed = set()
diff --git a/man/repoman.1 b/man/repoman.1
index 9d8f299d..aec8b7ad 100644
--- a/man/repoman.1
+++ b/man/repoman.1
@@ -79,6 +79,9 @@ Fix simple QA issues (stray digests, missing digests)
Generate a Manifest (fetches distfiles if necessary). See the \fB\-\-force\fR
option if you would like to replace existing distfiles digests.
.TP
+.B manifest-check
+Check Manifests for missing or incorrect digests
+.TP
.B commit
Scan directory tree for QA issues; if OK, commit via cvs
.SH QA KEYWORDS
@@ -298,6 +301,9 @@ Ebuild inherits autotools but does not call eautomake, eautoconf or eautoreconf
With virtual/jdk in DEPEND you must inherit a java eclass. Refer to
\fIhttp://www.gentoo.org/proj/en/java/java\-devel.xml\fR for more information.
.TP
+.B manifest.bad
+Manifest has missing or incorrect digests
+.TP
.B metadata.bad
Bad metadata.xml files
.TP