[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#713884: [lintian] patch



Package: lintian
Version: 2.5.13
control: tags -1 + patch

The patch here
From db9caab9c72e697547f01949f4d2ba5f63708b5b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Sun, 30 Jun 2013 21:26:12 +0200
Subject: [PATCH] Check if manapage name include buildd

usr/share/man/man3/_build_buildd-openchange_1.0-3-i386-mbKpOA_openchange-1.0_doc_.3.gz

Check this kind of strange man page
---
 checks/manpages.desc                         |    8 ++++++++
 checks/manpages.pm                           |    6 +++++-
 t/tests/manpages-general/debian/debian/rules |    3 +++
 t/tests/manpages-general/desc                |    1 +
 t/tests/manpages-general/tags                |    1 +
 5 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/checks/manpages.desc b/checks/manpages.desc
index 1b22764..2e3a3f1 100644
--- a/checks/manpages.desc
+++ b/checks/manpages.desc
@@ -271,3 +271,11 @@ Info: Lintian found a spelling error in the manpage. Lintian has a list
  avoid making the translations fuzzy.  With gettext, for example, this
  means you should also fix the spelling mistake in the corresponding
  msgids in the *.po files.
+
+Tag: manpage-include-buildd-name
+Severity: important
+Certainty: certain
+Info: The manual page are named after their build path and 
+ are incorrectly named.
+ .
+ Please check your debian/rules or upstream Makefile.
diff --git a/checks/manpages.pm b/checks/manpages.pm
index be67f6f..1df69f8 100644
--- a/checks/manpages.pm
+++ b/checks/manpages.pm
@@ -80,8 +80,12 @@ foreach my $file ($info->sorted_index) {
         (($path =~ m,^usr/man(/\S+),o)
          or ($path =~ m,^usr/X11R6/man(/\S+),o)
          or ($path =~ m,^usr/share/man(/\S+),o) );
-
     my $t = $1;
+
+    if( $file =~ m/_build_buildd/ or $file =~ /_tmp_buildd/) {
+        tag 'manpage-include-buildd-name', $file; 
+    }
+
     if (not $t =~ m,^.*man(\d)/$,o) {
         tag 'manpage-in-wrong-directory', $file;
         next;
diff --git a/t/tests/manpages-general/debian/debian/rules b/t/tests/manpages-general/debian/debian/rules
index ca84f25..0facd53 100755
--- a/t/tests/manpages-general/debian/debian/rules
+++ b/t/tests/manpages-general/debian/debian/rules
@@ -46,6 +46,9 @@ override_dh_auto_install:
 
 	pod2man --section 6 simple.pod | gzip -c --best > \
 		$(tmp)/usr/share/man/man6/simple.pod.gz
+	
+	pod2man --section 6 simple.pod | gzip -c --best > \
+		$(tmp)/usr/share/man/man6/_build_buildd-openchangex_1.0-3-i386-mbKpOA_openchange-1.0_simple.6.gz
 
 	gzip -c9 < test.1p.de \
 	    > $(tmp)/usr/share/man/man1/test-latin1-chars.1p.gz
diff --git a/t/tests/manpages-general/desc b/t/tests/manpages-general/desc
index f1779e4..b317fc4 100644
--- a/t/tests/manpages-general/desc
+++ b/t/tests/manpages-general/desc
@@ -15,6 +15,7 @@ Test-For:
  manpage-has-errors-from-pod2man
  manpage-has-useless-whatis-entry
  manpage-has-wrong-extension
+ manpage-include-buildd-name
  manpage-is-dh_make-template
  manpage-locale-dir-country-specific
  manpage-not-compressed
diff --git a/t/tests/manpages-general/tags b/t/tests/manpages-general/tags
index 497efff..fa58636 100644
--- a/t/tests/manpages-general/tags
+++ b/t/tests/manpages-general/tags
@@ -6,6 +6,7 @@ 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/share/man/man6/simple.pod.gz
+E: manpages-general: manpage-include-buildd-name usr/share/man/man6/_build_buildd-openchangex_1.0-3-i386-mbKpOA_openchange-1.0_simple.6.gz
 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/share/man/de/man1/binary-without-english-manpage.1
-- 
1.7.10.4


Reply to: