[SCM] Debian package checker branch, master, updated. 2.5.8-14-gbcb2bc4
The following commit has been merged in the master branch:
commit bcb2bc48a33a8f79130b0271000dbd78bec37df5
Author: Niels Thykier <niels@thykier.net>
Date: Thu Jun 14 11:33:18 2012 +0200
p/refresh-manual-refs: report all missing manuals
Report all missing manuals (rather than only the first). This is
prevents a tedious "install + refresh" cycle when most of the manuals
are not installed on the system.
Also print the "index" file for the manual. This makes it easier to
use (e.g.) apt-file to find the manual when the manual name is not a
1:1 match with the package name.
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/private/refresh-manual-refs b/private/refresh-manual-refs
index 49c66d7..ac9e0db 100755
--- a/private/refresh-manual-refs
+++ b/private/refresh-manual-refs
@@ -127,6 +127,19 @@ my %manuals = (
],
);
+# Check all of the manuals are present before trying anything
+{
+ my $ok = 1;
+ foreach my $manual (sort keys %manuals) {
+ my ($index, undef) = @{$manuals{$manual}};
+ unless ( -f $index ) {
+ print STDERR "Manual \"$manual\" not available (missing: $index)\n";
+ $ok = 0;
+ }
+ }
+ exit 1 unless $ok;
+}
+
# extract_refs -- Extract manual references from HTML file.
#
# This function takes the output file handle, the path to the page, and the
@@ -207,10 +220,6 @@ HEADER
for my $manual (sort keys %manuals) {
my ($index, $url, $ref_re, $fields, $sub_re) = @{$manuals{$manual}};
- if (not -f $index) {
- die "Manual '$manual' not installed, aborting.\n";
- }
-
# Extract references from the index.
my @subpages
= extract_refs(\*OUT, $manual, 0, $index, $url, $ref_re, $fields);
--
Debian package checker
Reply to: