[SCM] Debian package checker branch, master, updated. 1.24.3-23-gb28190b
The following commit has been merged in the master branch:
commit 92a8ddc6dcd312e6b8fb91a339e19ad392addb42
Author: Jordà Polo <jorda@ettin.org>
Date: Mon Aug 11 11:59:48 2008 +0200
Allow manual references with no public URL
This is a workaround for manuals that aren't available on debian.org (or a
similarly trusted source). The same information is displayed, but links will
be removed. This way it is possible to support manuals such as doc-base.
diff --git a/lib/Manual_refs.pm b/lib/Manual_refs.pm
index 111a8e7..8dd3708 100644
--- a/lib/Manual_refs.pm
+++ b/lib/Manual_refs.pm
@@ -27,7 +27,7 @@ open (REFS, '<', "${lib}lib/manual_refs")
while(<REFS>) {
chomp;
- next if not m/^(.+?)::(.*?)::(.+?)::(.+?)$/;
+ next if not m/^(.+?)::(.*?)::(.+?)::(.*?)$/;
my ($man, $section, $title, $u) = split('::');
$section = '0' if $section eq "";
diff --git a/lib/Read_taginfo.pm b/lib/Read_taginfo.pm
index 0cd4a22..33ddba6 100644
--- a/lib/Read_taginfo.pm
+++ b/lib/Read_taginfo.pm
@@ -100,6 +100,11 @@ sub manual_ref {
$text .= " $div(<a href='$sub_url'>$sub_title</a>)";
}
+ if (not $man_url) {
+ my @arr = ( $text );
+ $text = join('', dtml_to_text(@arr));
+ }
+
return $text;
}
diff --git a/private/manual_refs_update.pl b/private/manual_refs_update.pl
index dadace8..ee45359 100755
--- a/private/manual_refs_update.pl
+++ b/private/manual_refs_update.pl
@@ -28,7 +28,8 @@ use warnings;
# For each manual, we need:
# * Location of the manual directory on the local filesystem
-# * Base URL for the eventual target of the reference
+# * Base URL for the eventual target of the reference (or empty string if no
+# public URL is available)
# * Regex to match the possible references
# * Mapping from regex fields to reference fields (array of arrays of
# keywords: url, section title; the position of each keyword in the array
@@ -75,6 +76,10 @@ my %manuals = (
'http://www.debian.org/doc/packaging-manuals/menu.html/',
$index_re, $fields
],
+ 'doc-base' => [
+ '/usr/share/doc/doc-base/doc-base.html/index.html', '',
+ $index_re, $fields
+ ],
'debconf-spec' => [
'/usr/share/doc/debian-policy/debconf_specification.html',
'http://www.debian.org/doc/packaging-manuals/debconf_specification.html',
@@ -135,6 +140,7 @@ for my $manual (sort keys %manuals) {
$ref{title} =~ s/\n//g;
$ref{title} =~ s/\s+/ /g;
$ref{url} = "$url$ref{url}";
+ $ref{url} = '' if not $url;
my @out = ( $manual, $ref{section}, $ref{title}, $ref{url} );
print join('::', @out) . "\n";
}
--
Debian package checker
Reply to: