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

[SCM] Debian package checker branch, master, updated. 1.24.2-33-ga221f54



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

    [ADB] Don't read fields/* directly as the contents have almost certainly been cached in Lintian::Collect already.

diff --git a/checks/scripts b/checks/scripts
index 57d3c93..ea56334 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -193,6 +193,7 @@ my %deps = ();
 
 my $pkg = shift;
 my $type = shift;
+my $info = shift;
 
 open(INDEX, '<', "index") or fail("cannot open lintian index file: $!");
 while (<INDEX>) {
@@ -220,10 +221,8 @@ close(FILEINFO);
 my $all_deps = '';
 for my $field (qw/suggests recommends depends pre-depends provides/) {
     $deps{$field} = '';
-    if (open(IN, '<', "fields/$field")) {
-	$_ = join('', <IN>);
-	close(IN);
-        chomp;
+    if (defined $info->field($field)) {
+	$_ = $info->field($field);
         $deps{$field} = $_;
         $all_deps .= ', ' if $all_deps;
         $all_deps .= $_;
diff --git a/debian/changelog b/debian/changelog
index fea190d..d3162ef 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -46,6 +46,8 @@ lintian (1.24.3) unstable; urgency=low
   * checks/scripts{,.desc}:
     + [RA] Warn about maintainer scripts that prepend a path to commands.
       Based on a patch by Raphael Geissert.  (Closes: #376184)
+    + [ADB] Don't read fields/* directly as the contents have almost certainly
+      been cached in Lintian::Collect already.
   * checks/shared-libs.desc:
     + [ADB] Improve the description of no-symbols-control-file.
 

-- 
Debian package checker


Reply to: