[pkg-perl-tools] 01/01: Move module-name check to lintian proper.

Axel Beckert abe at deuxchevaux.org
Tue Aug 11 15:27:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

abe pushed a commit to branch ppt-lc-mover
in repository pkg-perl-tools.

commit 1ab6b7d526fe2e849c79d84893350925cb1415d1
Author: Axel Beckert <abe at deuxchevaux.org>
Date:   Tue Aug 11 17:27:18 2015 +0200

    Move module-name check to lintian proper.
---
 debian/changelog                         |  3 ++
 lintian/checks/pkg-perl/module-name.desc | 12 ------
 lintian/checks/pkg-perl/module-name.pm   | 65 --------------------------------
 3 files changed, 3 insertions(+), 77 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 14ab82c..48557f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,9 @@ pkg-perl-tools (0.23) UNRELEASED; urgency=medium
   * Fix patchedit to not expect a file in $PATH as $EDITOR but to support
     $EDITOR to contain commandline options.
   * Move application-not-library lintian check to lintian proper.
+  * Rewrite module-name check (tag no-module-name-in-description) as
+    binary check and integrate it into lintian's description check as tag
+    perl-module-name-not-mentioned-in-description.
 
   [ gregor herrmann ]
   * examples/check-build: use mergechanges for sourceless uploads instead
diff --git a/lintian/checks/pkg-perl/module-name.desc b/lintian/checks/pkg-perl/module-name.desc
deleted file mode 100644
index b35815a..0000000
--- a/lintian/checks/pkg-perl/module-name.desc
+++ /dev/null
@@ -1,12 +0,0 @@
-Check-Script: pkg-perl/module-name
-Author: Damyan Ivanov
-Type: source
-Info: check that module name appears in long description
-Needs-Info: unpacked
-
-Tag: no-module-name-in-description
-Severity: important
-Certainty: certain
-Info: Debian users are likely to look for perl modules by their name, e.g.
- Foo::Bar, not by package name (libfoo-bar-perl). To make this easier, the main
- module name should be present in the long package description.
diff --git a/lintian/checks/pkg-perl/module-name.pm b/lintian/checks/pkg-perl/module-name.pm
deleted file mode 100644
index c1db77f..0000000
--- a/lintian/checks/pkg-perl/module-name.pm
+++ /dev/null
@@ -1,65 +0,0 @@
-# pkg-perl/module-name -- lintian check script for checking that module name is present in the long description
-#
-# Copyright © 2013 Niels Thykier <niels at thykier.net>
-# Copyright © 2013 gregor herrmann <gregoa at debian.org>
-# Copyright © 2013, 2014 Axel Beckert <abe at debian.org>
-# Copyright © 2014 Damyan Ivanov <dmn at debian.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, you can find it on the World Wide
-# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301, USA.
-
-package Lintian::pkg_perl::module_name;
-
-use strict;
-use warnings;
-
-use Lintian::Tags qw(tag);
-
-sub run {
-    my ( $pkg, $type, $info, $proc, $group ) = @_;
-
-    # Only for pkg-perl packages
-    return
-        unless $info->field('maintainer')
-        =~ /pkg-perl-maintainers\@lists\.alioth\.debian\.org/sm;
-
-    my @binaries = $info->binaries;
-    for my $b (@binaries) {
-        next unless $b =~ /lib(.+)-perl/;
-        my $mod = $1;
-        my @mod_path_elements = split( /-/, $mod );
-        $mod = join( '::', map {ucfirst} @mod_path_elements );
-        my $mod_lc = lc($mod);
-        my $d = $info->binary_field( $b, 'description' );
-        $d =~ s/[^\n]+\n//; # strip long description
-
-        my $pm_found = 0;
-        my $pmpath = join( '/', @mod_path_elements ).'.pm';
-        my $pm     = $mod_path_elements[-1].'.pm';
-
-        foreach my $filepath ($info->sorted_index) {
-            if ($filepath =~ m(\Q$pmpath\E\z|/\Q$pm\E\z)i) {
-                $pm_found = 1;
-                last;
-            }
-        }
-
-        tag( 'no-module-name-in-description', $b, $mod )
-            if (lc($d) !~ /\Q$mod_lc\E/ and $pm_found);
-    }
-}
-
-1;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/pkg-perl-tools.git



More information about the Pkg-perl-cvs-commits mailing list