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

[SCM] Debian package checker branch, master, updated. 2.2.6-38-gf73c71b



The following commit has been merged in the master branch:
commit ff049f1504d3fff3380df0e6785dbea973635787
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date:   Wed Mar 4 18:36:29 2009 +0000

    Use Lintian::Relation in checks/debhelper

diff --git a/checks/debhelper b/checks/debhelper
index bb50b68..3882837 100644
--- a/checks/debhelper
+++ b/checks/debhelper
@@ -22,7 +22,6 @@ package Lintian::debhelper;
 use strict;
 
 use lib "$ENV{'LINTIAN_ROOT'}/lib";
-use Dep;
 use Tags;
 use Util;
 use Lintian::Data;
@@ -244,35 +243,26 @@ while (defined(my $file=readdir(DEBIAN))) {
 	    }
 	}
     } elsif ($file =~ m/^control$/) {
-        my ($control) = read_dpkg_control("debfiles/$file");
-
-	# Collect dependency information from debian/control.
-        my $bdepends = '';
-        for my $field ('build-depends', 'build-depends-indep') {
-            next unless $control->{$field};
-            $bdepends .= ', ' if $bdepends;
-            $bdepends .= $control->{$field};
-        }
-	my $bdepends_noarch = Dep::parse_noarch($bdepends);
-        $bdepends = Dep::parse($bdepends);
-        if ($needbuilddepends && ! Dep::implies($bdepends, Dep::parse('debhelper'))) {
+	my $bdepends_noarch = $info->relation_noarch('build-depends-all');
+        my $bdepends = $info->relation('build-depends-all');
+        if ($needbuilddepends && ! $bdepends->implies('debhelper')) {
 	    tag "package-uses-debhelper-but-lacks-build-depends", "";
 	}
 	while (my ($dep, $command) = each %missingbdeps) {
 	    next if $dep eq 'debhelper'; #handled above
 	    tag 'missing-build-dependency-for-dh_-command', "$command=$dep"
-		unless (Dep::implies($bdepends_noarch, Dep::parse($dep)));
+		unless ($bdepends_noarch->implies($dep));
 	}
-	my $needed = Dep::parse("debhelper (>= $level)");
-	if ($level > 5 && ! Dep::implies($bdepends, $needed)) {
+	my $needed = "debhelper (>= $level)";
+	if ($level > 5 && ! $bdepends->implies($needed)) {
 	    tag "package-lacks-versioned-build-depends-on-debhelper", $level;
 	} elsif (@versioncheck) {
 	    my %seen;
 	    @versioncheck = grep { !$seen{$_}++ } @versioncheck;
 	    for my $program (@versioncheck) {
 		my $required = $versions{$program};
-		my $needed = Dep::parse("debhelper (>= $required)");
-		unless (Dep::implies($bdepends, $needed)) {
+		my $needed = "debhelper (>= $required)";
+		unless ($bdepends->implies($needed)) {
 		    tag 'debhelper-script-needs-versioned-build-depends',
 			$program, "(>= $required)";
 		}
diff --git a/debian/changelog b/debian/changelog
index 664730c..ec0f7e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -29,6 +29,8 @@ lintian (2.2.7) UNRELEASED; urgency=low
     + [RA] Be robust against whitespace in the Architecture field.
   * checks/debconf:
     + [ADB] Use Lintian::Relation rather than Dep.
+  * checks/debhelper:
+    + [ADB] Use Lintian::Relation rather than Dep.
   * checks/fields:
     + [RA] Precompile constant regexes with qr.  Patch from Raphael
       Geissert.

-- 
Debian package checker


Reply to: