lintian: r391 - in trunk: checks debian testset testset/manpages/debian
Author: he
Date: 2004-12-25 13:27:21 +0100 (Sat, 25 Dec 2004)
New Revision: 391
Modified:
trunk/checks/manpages
trunk/checks/manpages.desc
trunk/debian/changelog
trunk/testset/manpages/debian/changelog
trunk/testset/manpages/debian/rules
trunk/testset/tags.manpages
Log:
checks/manpages:
+ [HE] Emit binary-without-english-manpage if a package only provides
translated manpages for a binary. (Closes: #259227)
Modified: trunk/checks/manpages
===================================================================
--- trunk/checks/manpages 2004-12-25 00:58:09 UTC (rev 390)
+++ trunk/checks/manpages 2004-12-25 12:27:21 UTC (rev 391)
@@ -118,6 +118,8 @@
next;
}
my ($section,$name) = ($1,$fname);
+ my $lang = "";
+ $lang = $1 if $t =~ m,^/([^/]+)/man\d/$,o;
my @pieces = split(/\./, $name);
my $ext = pop @pieces;
@@ -136,7 +138,8 @@
my $section_num = $fn_section;
if (scalar @pieces && $section_num =~ s/^(\d).*$/$1/) {
my $bin = join(".", @pieces);
- $manpage{$bin} = $file;
+ $manpage{$bin} = [] unless $manpage{$bin};
+ push @{$manpage{$bin}}, { file => $file, lang => $lang };
# number of directory and manpage extension equal?
if ($section_num != $section) {
@@ -270,20 +273,29 @@
if ($binary{$f} =~ m/X11/ or
($link{$f} && $link{$f} =~ m/X11/)) { #Link to a X11 dir
# yes. manpage in X11 too?
- if ($manpage{$f} =~ m/X11/) {
- # ok.
- } else {
- tag "manpage-for-x11-binary-in-wrong-directory", "$binary{$f} $manpage{$f}";
+ for my $manp_info (@{$manpage{$f}}) {
+ if ($manp_info->{file} =~ m/X11/) {
+ # ok.
+ } else {
+ tag "manpage-for-x11-binary-in-wrong-directory", "$binary{$f} $$manp_info{$f}";
+ }
}
+
} else {
- # no. manpage in X11?
- if ($manpage{$f} =~ m/X11/) {
- tag "manpage-for-non-x11-binary-in-wrong-directory", "$binary{$f} $manpage{$f}";
- } else {
- # ok.
+ for my $manp_info (@{$manpage{$f}}) {
+ # no. manpage in X11?
+ if ($manp_info->{file} =~ m/X11/) {
+ tag "manpage-for-non-x11-binary-in-wrong-directory", "$binary{$f} $$manp_info{$f}";
+ } else {
+ # ok.
+ }
}
}
+ if (not grep { $_->{lang} eq "" } @{$manpage{$f}}) {
+ tag "binary-without-english-manpage", "$f";
+ }
+
# unless (grep { $_ == $sect_by_binary{$f} } @{$sect_by_manpage{$f}}) {
# tag "no-manpage-in-correct-directory", "$binary{$f} (@{$sect_by_manpage{$f}})";
# }
Modified: trunk/checks/manpages.desc
===================================================================
--- trunk/checks/manpages.desc 2004-12-25 00:58:09 UTC (rev 390)
+++ trunk/checks/manpages.desc 2004-12-25 12:27:21 UTC (rev 391)
@@ -173,3 +173,11 @@
.
If you have to change file locations to abide by Debian Policy
please also patch the man page to mention these new locations.
+
+Tag: binary-without-english-manpage
+Type: warning
+Info: Each binary in <tt>/usr/bin</tt>, <tt>/usr/sbin</tt>, <tt>/bin</tt>,
+ <tt>/sbin</tt> or <tt>/usr/games</tt> should have a manual page. You don't
+ provide an english, only a translated manpage. Since english is fallback,
+ shipping only a non-english man page leaves most users without a man page
+ at all.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2004-12-25 00:58:09 UTC (rev 390)
+++ trunk/debian/changelog 2004-12-25 12:27:21 UTC (rev 391)
@@ -16,6 +16,8 @@
+ [HE] Don't compare the manpage filename extension and the content of
.TH case-sensitive. Report + patch by Jay Berkenbilt <ejb@ql.org>,
thanks. (Closes: #285335)
+ + [HE] Emit binary-without-english-manpage if a package only provides
+ translated manpages for a binary. (Closes: #259227)
* checks/md5sums:
+ [HE] Strip off ./ at the beginning of the filenames in md5sums
files (this seems to happen on some systems, though we don't know
Modified: trunk/testset/manpages/debian/changelog
===================================================================
--- trunk/testset/manpages/debian/changelog 2004-12-25 00:58:09 UTC (rev 390)
+++ trunk/testset/manpages/debian/changelog 2004-12-25 12:27:21 UTC (rev 391)
@@ -1,7 +1,9 @@
manpages (4-0.0.1) unstable; urgency=low
* Add a test manpage.
- * debian/rules: Fix a little bug creating a file named 755 in the source dir.
+ * debian/rules:
+ + Fix a little bug creating a file named 755 in the source dir.
+ + Add a new binary with no english manpage.
-- Marc 'HE' Brockschmidt <he@debian.org> Sat, 18 Dec 2004 13:32:29 +0100
Modified: trunk/testset/manpages/debian/rules
===================================================================
--- trunk/testset/manpages/debian/rules 2004-12-25 00:58:09 UTC (rev 390)
+++ trunk/testset/manpages/debian/rules 2004-12-25 12:27:21 UTC (rev 391)
@@ -10,12 +10,14 @@
install -d $(tmp)/usr/share/man/man1 $(tmp)/usr/share/man/man3 \
$(tmp)/usr/share/man/man6 $(tmp)/usr/X11R6/man/man6 \
$(tmp)/usr/bin $(tmp)/usr/sbin $(tmp)/usr/X11R6/bin \
- $(tmp)/usr/X11R6/man/man1/
+ $(tmp)/usr/share/man/de/man1 $(tmp)/usr/X11R6/man/man1/
touch $(tmp)/usr/bin/usr-bin-binary-alt
chmod 755 $(tmp)/usr/bin/usr-bin-binary-alt
touch $(tmp)/usr/sbin/usr-sbin-binary
chmod 755 $(tmp)/usr/sbin/usr-sbin-binary
touch $(tmp)/usr/X11R6/bin/rstartd
+ touch $(tmp)/usr/bin/binary-without-english-manpage
+ chmod 755 $(tmp)/usr/bin/binary-without-english-manpage
gzip -c9 <test.1p >$(tmp)/usr/share/man/man1/test.1p.gz
@@ -36,6 +38,8 @@
gzip -1 $(tmp)/usr/share/man/man6/usr-games-binary.6
touch $(tmp)/usr/X11R6/man/man6/X11R6-binary.man
chmod 644 $(tmp)/usr/X11R6/man/man6/X11R6-binary.man
+ touch $(tmp)/usr/share/man/de/man1/binary-without-english-manpage.1
+ chmod 644 $(tmp)/usr/share/man/de/man1/binary-without-english-manpage.1
install -d $(tmp)/usr/share/doc/manpages
cp debian/changelog $(tmp)/usr/share/doc/manpages/changelog
gzip -9 $(tmp)/usr/share/doc/manpages/changelog
@@ -46,6 +50,6 @@
binary: binary-arch binary-indep
clean:
- rm -rf $(tmp)
+ rm -rf debian/files $(tmp)
.PHONY: build binary-arch binary-indep binary clean
Modified: trunk/testset/tags.manpages
===================================================================
--- trunk/testset/tags.manpages 2004-12-25 00:58:09 UTC (rev 390)
+++ trunk/testset/tags.manpages 2004-12-25 12:27:21 UTC (rev 391)
@@ -1,12 +1,14 @@
E: manpages: bad-link-to-undocumented-manpage usr/share/man/man1/sbin-binary.1.gz
E: manpages: empty-manual-page usr/X11R6/man/man1/rstartd.1x.gz
E: manpages: empty-manual-page usr/X11R6/man/man6/X11R6-binary.man
+E: manpages: empty-manual-page usr/share/man/de/man1/binary-without-english-manpage.1
E: manpages: empty-manual-page usr/share/man/man1/usr-bin-binary-alt.1.gz
E: manpages: empty-manual-page usr/share/man/man1/usr-bin-binary.1
E: manpages: empty-manual-page usr/share/man/man1/usr-sbin-binary.1.gz
E: manpages: empty-manual-page usr/share/man/man6/usr-games-binary.6.gz
E: manpages: manpage-has-wrong-extension usr/X11R6/man/man6/X11R6-binary.man
E: manpages: manpage-not-compressed usr/X11R6/man/man6/X11R6-binary.man
+E: manpages: manpage-not-compressed usr/share/man/de/man1/binary-without-english-manpage.1
E: manpages: manpage-not-compressed usr/share/man/man1/usr-bin-binary.1
E: manpages: manpage-not-compressed-with-gzip usr/X11R6/man/man1/rstartd.1x.gz
E: manpages: manpage-not-compressed-with-gzip usr/share/man/man1/usr-bin-binary-alt.1.gz
@@ -18,6 +20,8 @@
W: manpages source: binary-nmu-debian-revision-in-source 4-0.0.1
W: manpages source: changelog-should-mention-nmu
W: manpages source: source-nmu-has-incorrect-version-number 4-0.0.1
+W: manpages: binary-without-english-manpage binary-without-english-manpage
+W: manpages: executable-not-elf-or-script ./usr/bin/binary-without-english-manpage
W: manpages: executable-not-elf-or-script ./usr/bin/usr-bin-binary-alt
W: manpages: executable-not-elf-or-script ./usr/sbin/usr-sbin-binary
W: manpages: link-to-undocumented-manpage usr/share/man/man1/bin-binary.1.gz
Reply to: