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

[PATCH] Add old-automake-build-dependency tag



From: Eric Dorland <eric@debian.org>

Add check and tag for a build dependency on an old version of automake.
---
 checks/automake.desc |  9 ++++++++-
 checks/automake.pm   | 17 +++++++++++++----
 2 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/checks/automake.desc b/checks/automake.desc
index 7b445c2..bf077c4 100644
--- a/checks/automake.desc
+++ b/checks/automake.desc
@@ -2,7 +2,7 @@ Check-Script: automake
 Author: Gautier Minster <gautier+debian@minster.io>
 Abbrev: autom
 Type: source
-Needs-Info: index
+Needs-Info: debfiles, index
 Info: Checks for erroneous, missing or deprecated automake files
 
 Tag: deprecated-configure-filename
@@ -13,3 +13,10 @@ Info: The use of 'configure.in' with automake is deprecated and will
  (helping upstream) migrating to 'configure.ac' instead.
 Ref: https://lists.gnu.org/archive/html/automake/2013-05/msg00049.html
 Experimental: yes
+
+Tag: old-automake-build-dependency
+Severity: wishlist
+Certainty: certain
+Info: The package build depends on an obsolete version of automake that will
+ be removed from the archive in the near term.
+Experimental: yes
diff --git a/checks/automake.pm b/checks/automake.pm
index 62482cd..a6f15f2 100644
--- a/checks/automake.pm
+++ b/checks/automake.pm
@@ -25,18 +25,27 @@ use autodie;
 
 use Lintian::Tags qw(tag);
 
+use constant OLD_AUTOMAKE_PACKAGES => qw(automake1.4 automake1.5 automake1.6);
+
 sub run {
     my (undef, undef, $info) = @_;
 
     my $makefile = $info->index('Makefile.am');
 
     # If there's no Makefile.am, automake probably isn't used, we're fine
-    return unless defined $makefile;
+    unless (defined $makefile) {
+        my $deprecated_configure = $info->index('configure.in');
+
+        if (defined $deprecated_configure) {
+            tag 'deprecated-configure-filename';
+        }
+    }
 
-    my $deprecated_configure = $info->index('configure.in');
+    my $bdepends = $info->relation('build-depends-all');
 
-    if (defined $deprecated_configure) {
-        tag 'deprecated-configure-filename';
+    for my $old_automake_package (OLD_AUTOMAKE_PACKAGES) {
+        tag 'old-automake-build-dependency'
+           if ($bdepends->implies($old_automake_package));
     }
 
     return;
-- 
1.8.4.rc3


Reply to: