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

[SCM] Debian package checker branch, master, updated. 1.24.2-39-gf8bdff7



The following commit has been merged in the master branch:
commit f8bdff7df430134aeb862dd8fe18cfeaf9b1bc46
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date:   Fri Jul 25 06:43:36 2008 +0100

    Migrate the fields/* reading to ::Collect::field()
    
    * checks/changelog-file:
      + [ADB] Use Lintian::Collect::field() instead of reading the fields/ files

diff --git a/checks/changelog-file b/checks/changelog-file
index 32d04fa..f72a2b6 100644
--- a/checks/changelog-file
+++ b/checks/changelog-file
@@ -32,6 +32,7 @@ sub run {
 
 my $pkg = shift;
 my $type = shift;
+my $info = shift;
 my $found_html=0;
 my $found_text=0;
 my $native_pkg;
@@ -187,12 +188,14 @@ if ( $found_html && !$found_text ) {
 }
 
 # is this a native Debian package?
-open(IN, '<', "fields/version")
-    or fail("cannot open fields/version file for reading: $!");
-chop(my $version = <IN>);
-close(IN);
+my $version;
+if (defined $info->field('version')) {
+    $version = $info->field('version');
+} else {
+    fail "Unable to determine version!";
+}
 
-$native_pkg  = ($version !~ m/-/);
+$native_pkg  = $info->native;
 $foreign_pkg = (!$native_pkg and $version !~ m/-0\./);
 # A version of 1.2.3-0.1 could be either, so in that
 # case, both vars are false
diff --git a/debian/changelog b/debian/changelog
index dedf955..9ee3c5c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ lintian (1.24.3) unstable; urgency=low
   * checks/binaries:
     + [ADB] Use Lintian::Collect throughout rather than reparsing file-info
       and objdump-info.
+  * checks/changelog-file:
+    + [ADB] Use Lintian::Collect::field() instead of reading the fields/ files
   * checks/copyright-file{,.desc}:
     + [ADB] Drop the "copyright line too long" check.  Most of the issues
       it flags aren't easily fixable, particularly where the copyright file

-- 
Debian package checker


Reply to: