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

[SCM] Debian package checker branch, master, updated. 1.24.2-32-gb8c24ae



The following commit has been merged in the master branch:
commit b8c24ae039372399998dd4db4516b3c1933c13cd
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date:   Fri Jul 25 02:15:58 2008 +0100

    Convert fields/* reading to ::Collect::field() access

diff --git a/checks/rules b/checks/rules
index 300d0b9..55e5d90 100644
--- a/checks/rules
+++ b/checks/rules
@@ -37,6 +37,7 @@ sub run {
 
 my $pkg = shift;
 my $type = shift;
+my $info = shift;
 
 # Policy could be read as allowing debian/rules to be a symlink to some other
 # file, and in a native Debian package it could be a symlink to a file that we
@@ -52,23 +53,16 @@ unless (-d "fields") {
     fail("directory in lintian laboratory for $type package $pkg missing: fields");
 }
 
-my $architecture = "";
-if(open (IN, '<', "fields/architecture")) {
-    chomp($architecture = <IN>)
-}
-close(IN);
+my $architecture = ""; 
+$architecture = $info->field('architecture') || "";
 
 #get build-depends:
 my $build_deps = "";
-if (open(IN, '<', "fields/build-depends")) {
-    local $/ = undef;
-    chomp($build_deps .= <IN>);
-    close(IN);
+if (defined $info->field('build-depends')) {
+    $build_deps = $info->field('build-depends');
 }
-if (open(IN, '<', "fields/build-depends-indep")) {
-    local $/ = undef;
-    chomp($build_deps .= <IN>);
-    close(IN);
+if (defined $info->field('build-depends-indep')) {
+    $build_deps .= $info->field('build-depends-indep');
 }
 $build_deps = Dep::parse($build_deps);
 
diff --git a/debian/changelog b/debian/changelog
index 97f873a..fea190d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -41,6 +41,8 @@ lintian (1.24.3) unstable; urgency=low
   * checks/po-debconf{,.desc}:
     + [ADB] Check that at least one complete translation exists.  Thanks Jordà
       Polo.
+  * checks/rules:
+    + [ADB] Use ::Collect for field access.
   * checks/scripts{,.desc}:
     + [RA] Warn about maintainer scripts that prepend a path to commands.
       Based on a patch by Raphael Geissert.  (Closes: #376184)

-- 
Debian package checker


Reply to: