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

[lintian] 02/02: c/debhelper: Avoid false-positive useless-autoreconf-build-depends



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

nthykier pushed a commit to branch master
in repository lintian.

commit d0fc84fad2e7262c11bc8070c78c9d1fae8b6c8b
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Oct 14 12:51:07 2017 +0000

    c/debhelper: Avoid false-positive useless-autoreconf-build-depends
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 checks/debhelper.pm | 11 +++++------
 debian/changelog    |  3 +++
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/checks/debhelper.pm b/checks/debhelper.pm
index 74902e4..da15d1a 100644
--- a/checks/debhelper.pm
+++ b/checks/debhelper.pm
@@ -61,14 +61,10 @@ sub run {
     my $needtomodifyscripts = '';
     my $compat = 0;
     my $seendhcleank = '';
-    my %missingbdeps;
-    my %missingbdeps_addons;
-
-    my $maybe_skipping;
-    my $dhcompatvalue;
+    my (%missingbdeps, %missingbdeps_addons, $maybe_skipping, $dhcompatvalue);
     my $inclcdbs = 0;
 
-    my ($bdepends_noarch, $bdepends, %build_systems);
+    my ($bdepends_noarch, $bdepends, %build_systems, $uses_autotools_dev_dh);
     my $seen_dh = 0;
     my $seen_python_helper = 0;
     my $seen_python3_helper = 0;
@@ -102,6 +98,7 @@ sub run {
                 or $dhcommand eq 'dh_autotools-dev_updateconfig') {
                 tag 'debhelper-tools-from-autotools-dev-are-deprecated',
                   "$dhcommand (line $.)";
+                $uses_autotools_dev_dh = 1;
             }
             if ($dhcommand eq 'dh_python3') {
                 $seen_python3_helper = 1;
@@ -151,6 +148,7 @@ sub run {
                         tag
                           'debhelper-tools-from-autotools-dev-are-deprecated',
                           "dh ... --with ${orig_addon} (line $.)";
+                        $uses_autotools_dev_dh = 1;
                     }
                     if (defined $depends) {
                         $missingbdeps_addons{$depends} = $addon;
@@ -470,6 +468,7 @@ sub run {
 
     if ($level >= 10) {
         for my $pkg (qw(dh-autoreconf autotools-dev)) {
+            next if $pkg eq 'autotools-dev' and $uses_autotools_dev_dh;
             tag 'useless-autoreconf-build-depends', $pkg
               if $bdepends->implies($pkg);
         }
diff --git a/debian/changelog b/debian/changelog
index dc22287..d4a9d4c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,9 @@ lintian (2.5.56) UNRELEASED; urgency=medium
     + [NT] Add check for using using the debhelper tooling from the
       autotools-dev package.  These have been replaced by the changes
       inside debhelper itself.
+    + [NT] Avoid useless-autoreconf-build-depends for autotools-dev when
+      the autotools-dev tooling is used in debian/rules.
+      (Closes: #871711)
   * checks/watch-file.pm:
     + [CL] Include the offending URI in debian-watch-uses-insecure-uri
       output, not the line number.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: