Commit f3ca0a90 authored by Osamu Aoki's avatar Osamu Aoki Committed by Chris Lamb

Check for files in doc-base control files that list paths pointing outside of...

Check for files in doc-base control files that list paths pointing outside of /usr/share/{doc,info}. (Closes: #925200)

This test make sure that the files referenced in an Index or Files field always
use the correct path as requested by doc-base 2.3.2.2.
Signed-off-by: Chris Lamb's avatarChris Lamb <lamby@debian.org>
parent 58adffea
Pipeline #40603 failed with stage
in 89 minutes and 42 seconds
......@@ -144,6 +144,14 @@ Info: The Index field in a doc-base file should reference the single index
should be listed in the Files field.
Ref: doc-base 2.3.2.2
Tag: doc-base-file-references-wrong-path
Severity: important
Certainty: certain
Info: The specified doc-base control file references a file in an
<tt>Index</tt> or <tt>Files</tt> field that does not start with
<tt>/usr/share/doc</tt> or <tt>/usr/share/info</tt>.
Ref: doc-base 2.3.2.2
Tag: doc-base-file-references-missing-file
Severity: important
Certainty: certain
......
......@@ -350,6 +350,11 @@ sub check_doc_base_field {
if ($field eq 'index' && @files > 1) {
tag 'doc-base-index-references-multiple-files', "$dbfile:$line";
}
for my $file (@files) {
next if $file =~ m %^/usr/share/doc/%;
next if $file =~ m %^/usr/share/info/%;
tag 'doc-base-file-references-wrong-path', "$dbfile:$line", $file;
}
for my $file (@files) {
next if $file eq '';
my $realfile = delink($file, $all_links);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment