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

[SCM] Debian package checker branch, master, updated. 1.24.2-28-g6bed16c



The following commit has been merged in the master branch:
commit 5ec0b78a14608610728fccbcefaf8a481ee56b38
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date:   Fri Jul 25 01:42:41 2008 +0100

    [ADB] Use Lintian::Collect for accessing control fields

diff --git a/checks/copyright-file b/checks/copyright-file
index 78849c7..468eb4d 100644
--- a/checks/copyright-file
+++ b/checks/copyright-file
@@ -27,10 +27,14 @@ use Util;
 
 use Encode qw(decode);
 
+# Used in depends_on()
+my $info;
+
 sub run {
 
 my $pkg = shift;
 my $type = shift;
+$info = shift;
 
 my $ppkg = quotemeta($pkg);
 
@@ -292,20 +296,13 @@ sub depends_on {
 
     my ($deps, $predeps) = ("", "");
 
-    my $f = "fields/depends";
-    if (-f $f) {
-	open(I, '<', $f) or die "cannot open depends file $f: $!";
-	chop($deps = <I>);
-	close(I);
+    if (defined $info->field('depends')) {
+	$deps = $info->field('depends');
     }
 
-    $f = "fields/pre-depends";
-    if (-f $f) {
-	open(I, '<', $f) or die "cannot open pre-depends file $f: $!";
-	chop($predeps = <I>);
-	close(I);
+    if (defined $info->field('pre-depends')) {
+	$predeps = $info->field('pre-depends');
     }
-
     return 1 if Dep::implies(Dep::parse($deps), Dep::parse($package));
     return 1 if Dep::implies(Dep::parse($predeps), Dep::parse($package));
 
diff --git a/debian/changelog b/debian/changelog
index 6179018..dd43938 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ lintian (1.24.3) unstable; urgency=low
     + [ADB] Drop the "copyright line too long" check.  Most of the issues
       it flags aren't easily fixable, particularly where the copyright file
       is (semi)automatically generated.  (Closes: #491302, #491365, #491685)
+    + [ADB] Use Lintian::Collect for accessing control fields
   * checks/cruft:
     + [ADB] Use Lintian::Collect for accessing control fields
   * checks/debconf:

-- 
Debian package checker


Reply to: