[lintian] 01/01: Fix f/p in perl-module-name-not-mentioned-in-description (Closes: #795779)
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to branch master
in repository lintian.
commit 0b692ca4ba7a9612e9fe05af5c3a1e0bf3fbdfb7
Author: Axel Beckert <abe@deuxchevaux.org>
Date: Sun Aug 16 22:06:42 2015 +0200
Fix f/p in perl-module-name-not-mentioned-in-description (Closes: #795779)
index() was called with its parameter order being the wrong way. This
was not present in pkg-perl-tools as using index() replaced the
previously used regular expression matching for performance reasons.
This also adds a test case for such a false positive, i.e. there's now
a package in the test suite which shouldn't trigger the tag.
---
checks/description.pm | 2 +-
debian/changelog | 3 +++
t/tests/description-perl/debian/debian/control.in | 12 +++++++++++-
.../debian/{install => libdeb-long-description-perl.install} | 0
.../debian/libdeb-long-description-proper-perl.install | 1 +
.../debian/lib/Deb/Long/Description/Proper.pm | 5 +++++
6 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/checks/description.pm b/checks/description.pm
index 0f2eaec..badf31f 100644
--- a/checks/description.pm
+++ b/checks/description.pm
@@ -268,7 +268,7 @@ sub run {
}
tag 'perl-module-name-not-mentioned-in-description', $mod
- if (index($mod_lc, lc($description)) < 0 and $pm_found);
+ if (index(lc($description), $mod_lc) < 0 and $pm_found);
}
return;
diff --git a/debian/changelog b/debian/changelog
index 9acaca0..daa4f0c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,9 @@ lintian (2.5.37) UNRELEASED; urgency=medium
+ [NT] Apply patch from Michael Stapelberg to a
common false positive spelling mistake in "go"
binaries. (Closes: #795614)
+ * checks/description.pm:
+ + [AB] Fix false positives in
+ perl-module-name-not-mentioned-in-description (Closes: #795779)
* checks/fields.desc:
+ [JW] Use "an" (instead of "a") before "HTTP".
diff --git a/t/tests/description-perl/debian/debian/control.in b/t/tests/description-perl/debian/debian/control.in
index cf75af0..de25b04 100644
--- a/t/tests/description-perl/debian/debian/control.in
+++ b/t/tests/description-perl/debian/debian/control.in
@@ -13,4 +13,14 @@ Description: lintian dummy package to test a module name related check
about not mentioning the contained perl module.
.
For testing and length-ish purposes, with Long::Description a similar
- name is mentioned though
+ name is mentioned though.
+
+Package: libdeb-long-description-proper-perl
+Architecture: {$architecture}
+Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
+Description: lintian dummy package to test a module name related false positive
+ This package is solely meant for testing a lintian check to argue
+ about not mentioning the contained perl module.
+ .
+ This is a package which checks the test for false positives, so it
+ actually mentions Deb::Long::Description::Proper.
diff --git a/t/tests/description-perl/debian/debian/install b/t/tests/description-perl/debian/debian/libdeb-long-description-perl.install
similarity index 100%
rename from t/tests/description-perl/debian/debian/install
rename to t/tests/description-perl/debian/debian/libdeb-long-description-perl.install
diff --git a/t/tests/description-perl/debian/debian/libdeb-long-description-proper-perl.install b/t/tests/description-perl/debian/debian/libdeb-long-description-proper-perl.install
new file mode 100644
index 0000000..5c2f399
--- /dev/null
+++ b/t/tests/description-perl/debian/debian/libdeb-long-description-proper-perl.install
@@ -0,0 +1 @@
+lib/Deb/Long/Description/Proper.pm usr/share/perl5/Deb/Long/Description
diff --git a/t/tests/description-perl/debian/lib/Deb/Long/Description/Proper.pm b/t/tests/description-perl/debian/lib/Deb/Long/Description/Proper.pm
new file mode 100644
index 0000000..67230b9
--- /dev/null
+++ b/t/tests/description-perl/debian/lib/Deb/Long/Description/Proper.pm
@@ -0,0 +1,5 @@
+# Dummy Perl module for lintian testing purposes.
+
+package Deb::Long::Description::Proper;
+
+return 1;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: