[SCM] Debian package checker branch, master, updated. 2.2.12-24-g92b1399
The following commit has been merged in the master branch:
commit 92b1399f55334380e2693d8e0974776afa550cf6
Author: Russ Allbery <rra@debian.org>
Date: Wed Jul 1 10:46:28 2009 -0700
Don't warn about hyphens as minus signs in draft mode
* checks/manpages:
+ [RA] Don't warn about hyphens used as minus signs inside draft mode,
since \- cannot be used there. Based on a patch by Gennaro Oliva.
(Closes: #535308)
diff --git a/checks/manpages b/checks/manpages
index f04f043..2884b90 100644
--- a/checks/manpages
+++ b/checks/manpages
@@ -274,6 +274,7 @@ foreach my $file (sort keys %{$info->index}) {
# Now we search through the whole man page for some common errors
my $lc = 0;
my $hc = 0;
+ my $draft_mode = 0;
foreach my $line (@manfile) {
$lc++;
chomp $line;
@@ -289,14 +290,19 @@ foreach my $file (sort keys %{$info->index}) {
# Catch hyphens used as minus signs by looking for ones at the
# beginning of a word, but don't generate false positives on \s-1
# (small font), \*(-- (pod2man long dash), or things like \h'-1'.
- if ($line =~ /^(
- ([^\.].*)?
- [\s\'\"\`\(\[]
- (?<! \\s | \*\( | \(- | \w\' )
- )?
- (--?\w+)/ox) {
+ # Ignoring hyphens contained in draft mode (.eo).
+ $draft_mode = 1 if $line =~ /^\.\s*eo/;
+ $draft_mode = 0 if $line =~ /^\.\s*ec/;
+ if (not $draft_mode
+ and $line =~ /^(
+ ([^\.].*)?
+ [\s\'\"\`\(\[]
+ (?<! \\s | \*\( | \(- | \w\' )
+ )?
+ (--?\w+)/ox) {
$hc++;
- tag "hyphen-used-as-minus-sign", "$file:$lc" if $hc <= 10 or $ENV{'LINTIAN_DEBUG'};
+ tag "hyphen-used-as-minus-sign", "$file:$lc"
+ if $hc <= 10 or $ENV{'LINTIAN_DEBUG'};
}
if (($line =~ m,(/usr/(dict|doc|etc|info|man|adm|preserve)/),o)
|| ($line =~ m,(/var/(adm|catman|named|nis|preserve)/),o)) {
@@ -308,7 +314,9 @@ foreach my $file (sort keys %{$info->index}) {
tag "manpage-has-errors-from-pod2man", "$file:$lc";
}
}
- tag "hyphen-used-as-minus-sign", $file, ($hc-10), "more occurrences not shown" if $hc > 10 and ! $ENV{'LINTIAN_DEBUG'};
+ tag "hyphen-used-as-minus-sign", $file, ($hc - 10),
+ "more occurrences not shown"
+ if ($hc > 10 and ! $ENV{'LINTIAN_DEBUG'});
}
}
diff --git a/debian/changelog b/debian/changelog
index d3e5413..2ceace2 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -28,6 +28,10 @@ lintian (2.2.13) UNRELEASED; urgency=low
+ [RA] Don't require symlink init scripts to be conffiles and realize
they are included in the package even if the symlink is dangling.
Thanks, Steve Langasek. (Closes: #534326)
+ * checks/manpages:
+ + [RA] Don't warn about hyphens used as minus signs inside draft mode,
+ since \- cannot be used there. Based on a patch by Gennaro Oliva.
+ (Closes: #535308)
* checks/patch-systems:
+ [RA] Don't include the package name as extra data in tags that are
only issued for source packages. Patch from Raphael Geissert.
diff --git a/t/COVERAGE b/t/COVERAGE
index 13c90fb..5c50121 100644
--- a/t/COVERAGE
+++ b/t/COVERAGE
@@ -1,4 +1,4 @@
-Last generated 2009-06-18
+Last generated 2009-07-01
The following tags are not tested by the test suite:
@@ -137,7 +137,6 @@ manpages bad-so-link-within-manual-page
manpages manpage-for-non-x11-binary-in-wrong-directory
manpages manpage-for-x11-binary-in-wrong-directory
manpages manpage-in-wrong-directory
-manpages manpage-section-mismatch
menu-format bad-test-in-menu-item
menu-format desktop-entry-contains-deprecated-key
@@ -449,23 +448,7 @@ init.d prerm-calls-updaterc.d
lintian bad-ubuntu-distribution-in-changes-file
-manpages bad-link-to-undocumented-manpage
-manpages binary-without-english-manpage
manpages binary-without-manpage
-manpages empty-manual-page
-manpages hyphen-used-as-minus-sign
-manpages link-to-undocumented-manpage
-manpages manpage-has-bad-whatis-entry
-manpages manpage-has-errors-from-man
-manpages manpage-has-errors-from-pod2man
-manpages manpage-has-useless-whatis-entry
-manpages manpage-has-wrong-extension
-manpages manpage-is-dh_make-template
-manpages manpage-locale-dir-country-specific
-manpages manpage-not-compressed
-manpages manpage-not-compressed-with-gzip
-manpages manpage-not-compressed-with-max-compression
-manpages x11-games-should-be-in-usr-games
md5sums file-missing-in-md5sums
md5sums malformed-md5sums-control-file
diff --git a/t/tests/manpages-general/debian/debian/rules b/t/tests/manpages-general/debian/debian/rules
new file mode 100755
index 0000000..ced9e29
--- /dev/null
+++ b/t/tests/manpages-general/debian/debian/rules
@@ -0,0 +1,63 @@
+#!/usr/bin/make -f
+
+tmp = $(CURDIR)/debian/$(shell dh_listpackages)
+
+%:
+ dh $@
+
+override_dh_auto_install:
+ 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/share/man/de/man1 $(tmp)/usr/X11R6/man/man1
+ printf '#!/bin/sh\ntrue\n' > $(tmp)/usr/bin/usr-bin-binary-alt
+ chmod 755 $(tmp)/usr/bin/usr-bin-binary-alt
+ printf '#!/bin/sh\ntrue\n' > $(tmp)/usr/sbin/usr-sbin-binary
+ chmod 755 $(tmp)/usr/sbin/usr-sbin-binary
+ printf '#!/bin/sh\ntrue\n' > $(tmp)/usr/X11R6/bin/rstartd
+ chmod 755 $(tmp)/usr/X11R6/bin/rstartd
+ printf '#!/bin/sh\ntrue\n' \
+ > $(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
+ gzip -c9 < true.1 > $(tmp)/usr/share/man/man1/true.1.gz
+ gzip -c9 < program.1 > $(tmp)/usr/share/man/man1/program.1.gz
+
+ ln -s ../X11R6/bin/rstartd $(tmp)/usr/bin/rstartd
+ gzip -c9 < program.1 > $(tmp)/usr/X11R6/man/man1/rstartd.1x.gz
+
+ ln -s ../man7/undocumented.7.gz \
+ $(tmp)/usr/share/man/man1/bin-binary.1.gz
+ ln -s undocumented.7.gz $(tmp)/usr/share/man/man1/sbin-binary.1.gz
+ ln -s undocumented.3.gz $(tmp)/usr/share/man/man3/function.3.gz
+
+ touch $(tmp)/usr/share/man/man1/usr-bin-binary.1
+ chmod 644 $(tmp)/usr/share/man/man1/usr-bin-binary.1
+ touch $(tmp)/usr/share/man/man1/usr-sbin-binary.1.gz
+ chmod 644 $(tmp)/usr/share/man/man1/usr-sbin-binary.1.gz
+ cd $(tmp)/usr/share/man/man1 \
+ && ln usr-sbin-binary.1.gz usr-bin-binary-alt.1.gz
+ touch $(tmp)/usr/share/man/man6/usr-games-binary.6
+ chmod 644 $(tmp)/usr/share/man/man6/usr-games-binary.6
+ 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
+
+ gzip -c9 < test.1p.de \
+ > $(tmp)/usr/share/man/man1/test-latin1-chars.1p.gz
+ gzip -c9 < test.1p.de \
+ > $(tmp)/usr/share/man/de/man1/test-latin1-chars.1p.gz
+ install -d $(tmp)/usr/share/man/de_DE/man1
+ gzip -c9 < test.1p.utf-8 \
+ > $(tmp)/usr/share/man/de_DE/man1/test-utf8-chars.1p.gz
+
+ gzip -c9 <include.3 >$(tmp)/usr/share/man/man3/include.3.gz
+ gzip -c9 <included.3 >$(tmp)/usr/share/man/man3/included.3.gz
+
+override_dh_fixperms:
+override_dh_installman:
+
+override_dh_compress:
+ gzip -9 $(tmp)/usr/share/doc/manpages-general/changelog
diff --git a/testset/manpages/foo.info b/t/tests/manpages-general/debian/foo.info
similarity index 100%
copy from testset/manpages/foo.info
copy to t/tests/manpages-general/debian/foo.info
diff --git a/t/tests/manpages-general/debian/include.3 b/t/tests/manpages-general/debian/include.3
new file mode 100644
index 0000000..11d0089
--- /dev/null
+++ b/t/tests/manpages-general/debian/include.3
@@ -0,0 +1,29 @@
+.TH INCLUDE 3
+.SH NAME
+include \- include another chunk of a man page
+.SH INCLUDED BIT
+.nr zY 1
+.so man3/included.3
+.SH HYPHENS
+This isn't a hyphen\*(--just a long dash\*(--and \h'-1' also isn't, nor
+should we warn about `\-' or \-a, but -a
+and `-' (nope, that's fine) are bad news. So is
+--foo and
+(--bar)
+"--baz"
+and '--foo'.
+.\" Draft Mode example from sinfo man page from slurm-llnl. Draft mode
+.\" disables the normal operation of the backslash character, so we can't
+.\" tell users to use \- inside draft mode. These hyphens should
+.\" therefore not warn.
+.eo
+.nf
+> sinfo
+PARTITION AVAIL TIMELIMIT NODES STATE NODELIST
+batch up infinite 2 alloc adev[8-9]
+batch up infinite 6 idle adev[10-15]
+debug* up 30:00 8 idle adev[0-7]
+.fi
+.ec
+.SH SEE ALSO
+included(3)
diff --git a/testset/manpages/included.3 b/t/tests/manpages-general/debian/included.3
similarity index 100%
copy from testset/manpages/included.3
copy to t/tests/manpages-general/debian/included.3
diff --git a/testset/manpages/program.1 b/t/tests/manpages-general/debian/program.1
similarity index 100%
copy from testset/manpages/program.1
copy to t/tests/manpages-general/debian/program.1
diff --git a/testset/manpages/test.1p b/t/tests/manpages-general/debian/test.1p
similarity index 100%
copy from testset/manpages/test.1p
copy to t/tests/manpages-general/debian/test.1p
diff --git a/testset/manpages/test.1p.de b/t/tests/manpages-general/debian/test.1p.de
similarity index 100%
copy from testset/manpages/test.1p.de
copy to t/tests/manpages-general/debian/test.1p.de
diff --git a/testset/manpages/test.1p.utf-8 b/t/tests/manpages-general/debian/test.1p.utf-8
similarity index 100%
copy from testset/manpages/test.1p.utf-8
copy to t/tests/manpages-general/debian/test.1p.utf-8
diff --git a/testset/manpages/true.1 b/t/tests/manpages-general/debian/true.1
similarity index 100%
copy from testset/manpages/true.1
copy to t/tests/manpages-general/debian/true.1
diff --git a/t/tests/manpages-general/desc b/t/tests/manpages-general/desc
new file mode 100644
index 0000000..48943c9
--- /dev/null
+++ b/t/tests/manpages-general/desc
@@ -0,0 +1,22 @@
+Testname: manpages-general
+Sequence: 6000
+Version: 1.0
+Description: General tests for manpage checks
+Test-For:
+ bad-link-to-undocumented-manpage
+ binary-without-english-manpage
+ empty-manual-page
+ hyphen-used-as-minus-sign
+ link-to-undocumented-manpage
+ manpage-has-bad-whatis-entry
+ manpage-has-errors-from-man
+ manpage-has-errors-from-pod2man
+ manpage-has-useless-whatis-entry
+ manpage-has-wrong-extension
+ manpage-is-dh_make-template
+ manpage-locale-dir-country-specific
+ manpage-not-compressed
+ manpage-not-compressed-with-gzip
+ manpage-not-compressed-with-max-compression
+ manpage-section-mismatch
+ x11-games-should-be-in-usr-games
diff --git a/t/tests/manpages-general/tags b/t/tests/manpages-general/tags
new file mode 100644
index 0000000..ac3b3a3
--- /dev/null
+++ b/t/tests/manpages-general/tags
@@ -0,0 +1,46 @@
+E: manpages-general: bad-link-to-undocumented-manpage usr/share/man/man1/sbin-binary.1.gz
+E: manpages-general: empty-manual-page usr/X11R6/man/man6/X11R6-binary.man
+E: manpages-general: empty-manual-page usr/share/man/de/man1/binary-without-english-manpage.1
+E: manpages-general: empty-manual-page usr/share/man/man1/usr-bin-binary-alt.1.gz
+E: manpages-general: empty-manual-page usr/share/man/man1/usr-bin-binary.1
+E: manpages-general: empty-manual-page usr/share/man/man1/usr-sbin-binary.1.gz
+E: manpages-general: empty-manual-page usr/share/man/man6/usr-games-binary.6.gz
+E: manpages-general: manpage-has-wrong-extension usr/X11R6/man/man6/X11R6-binary.man
+E: manpages-general: manpage-is-dh_make-template usr/X11R6/man/man1/rstartd.1x.gz
+E: manpages-general: manpage-is-dh_make-template usr/share/man/man1/program.1.gz
+E: manpages-general: manpage-not-compressed usr/X11R6/man/man6/X11R6-binary.man
+E: manpages-general: manpage-not-compressed usr/share/man/de/man1/binary-without-english-manpage.1
+E: manpages-general: manpage-not-compressed usr/share/man/man1/usr-bin-binary.1
+E: manpages-general: manpage-not-compressed-with-gzip usr/share/man/man1/usr-bin-binary-alt.1.gz
+E: manpages-general: manpage-not-compressed-with-gzip usr/share/man/man1/usr-sbin-binary.1.gz
+E: manpages-general: manpage-not-compressed-with-max-compression usr/share/man/man6/usr-games-binary.6.gz
+E: manpages-general: package-installs-file-to-usr-x11r6 usr/X11R6/
+E: manpages-general: package-installs-file-to-usr-x11r6 usr/X11R6/man/
+E: manpages-general: package-installs-file-to-usr-x11r6 usr/X11R6/man/man1/
+E: manpages-general: package-installs-file-to-usr-x11r6 usr/X11R6/man/man1/rstartd.1x.gz
+E: manpages-general: package-installs-file-to-usr-x11r6 usr/X11R6/man/man6/
+E: manpages-general: package-installs-file-to-usr-x11r6 usr/X11R6/man/man6/X11R6-binary.man
+E: manpages-general: package-installs-file-to-usr-x11r6-bin usr/X11R6/bin/
+E: manpages-general: package-installs-file-to-usr-x11r6-bin usr/X11R6/bin/rstartd
+E: manpages-general: x11-games-should-be-in-usr-games usr/X11R6/man/man6/X11R6-binary.man
+I: manpages-general: hyphen-used-as-minus-sign usr/share/man/man3/include.3.gz:11
+I: manpages-general: hyphen-used-as-minus-sign usr/share/man/man3/include.3.gz:12
+I: manpages-general: hyphen-used-as-minus-sign usr/share/man/man3/include.3.gz:13
+I: manpages-general: hyphen-used-as-minus-sign usr/share/man/man3/include.3.gz:14
+I: manpages-general: hyphen-used-as-minus-sign usr/share/man/man3/include.3.gz:9
+W: manpages-general: binary-without-english-manpage usr/bin/binary-without-english-manpage
+W: manpages-general: gz-file-not-gzip usr/share/man/man1/usr-bin-binary-alt.1.gz
+W: manpages-general: gz-file-not-gzip usr/share/man/man1/usr-sbin-binary.1.gz
+W: manpages-general: link-to-undocumented-manpage usr/share/man/man1/bin-binary.1.gz
+W: manpages-general: link-to-undocumented-manpage usr/share/man/man3/function.3.gz
+W: manpages-general: manpage-has-bad-whatis-entry usr/X11R6/man/man6/X11R6-binary.man
+W: manpages-general: manpage-has-bad-whatis-entry usr/share/man/man1/usr-bin-binary-alt.1.gz
+W: manpages-general: manpage-has-bad-whatis-entry usr/share/man/man1/usr-bin-binary.1
+W: manpages-general: manpage-has-bad-whatis-entry usr/share/man/man1/usr-sbin-binary.1.gz
+W: manpages-general: manpage-has-bad-whatis-entry usr/share/man/man6/usr-games-binary.6.gz
+W: manpages-general: manpage-has-errors-from-man usr/share/man/man1/test.1p.gz 12: warning: `dep' not defined (probable missing space after `de')
+W: manpages-general: manpage-has-errors-from-man usr/share/man/man3/included.3.gz 6: warning: `zY' not defined
+W: manpages-general: manpage-has-errors-from-pod2man usr/share/man/man1/test.1p.gz:17
+W: manpages-general: manpage-has-useless-whatis-entry usr/share/man/man1/true.1.gz
+W: manpages-general: manpage-locale-dir-country-specific usr/share/man/de_DE/man1/test-utf8-chars.1p.gz
+W: manpages-general: manpage-section-mismatch usr/X11R6/man/man1/rstartd.1x.gz:5 1x != 1
--
Debian package checker
Reply to: