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

lintian: r702 - in trunk: checks debian



Author: rra
Date: 2006-07-25 04:37:06 +0200 (Tue, 25 Jul 2006)
New Revision: 702

Modified:
   trunk/checks/debhelper
   trunk/debian/changelog
Log:
* checks/debhelper:
  + [RA] Use the standard control file parser rather than a custom
    parser that can't handle continuation lines.

Modified: trunk/checks/debhelper
===================================================================
--- trunk/checks/debhelper	2006-07-16 01:49:49 UTC (rev 701)
+++ trunk/checks/debhelper	2006-07-25 02:37:06 UTC (rev 702)
@@ -173,18 +173,13 @@
 	    tag "debhelper-compat-file-is-empty", "";
 	}
     } elsif ($file =~ m/^control$/) {
-	open(IN,"debfiles/$file")
-	    or fail("Can't open debfiles/$file: $!");
-	while (<IN>) {
-	    if (s/^(Build-Depends|Build-Depends-Indep):\s*//i) {
-                $depends .= ', ' if $depends;
-                $depends .= $_;
-            }
-	    if (m/^\s*$/) { # end of first stanza
-		last;
-	    }
+        my ($control) = read_dpkg_control("debfiles/$file");
+        $depends = '';
+        for my $field ('build-depends', 'build-depends-indep') {
+            next unless $control->{$field};
+            $depends .= ', ' if $depends;
+            $depends .= $control->{$field};
         }
-	close IN;
         $depends = Dep::parse($depends);
         if ($needbuilddepends && ! Dep::implies($depends, Dep::parse('debhelper'))) {
 	    tag "package-uses-debhelper-but-lacks-build-depends", "";

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-07-16 01:49:49 UTC (rev 701)
+++ trunk/debian/changelog	2006-07-25 02:37:06 UTC (rev 702)
@@ -4,6 +4,9 @@
     + [RA] Remove deb-created-with-broken-tar; the bug was actually in
       dpkg, and the dpkg in stable has been fixed.  Thanks Jari Aalto and
       Thijs Kinkhorst.  (Closes: #375638, #376030)
+  * checks/debhelper:
+    + [RA] Use the standard control file parser rather than a custom
+      parser that can't handle continuation lines.
   * checks/fields{.desc,}:
     + [RA] Don't warn virtual-package-depends-without-real-package-depends
       for Recommends and rewrite the tag description to be more accurate.
@@ -29,7 +32,7 @@
       therefore cause lintian to exit with non-zero status.  Thanks,
       Andree Leidenfrost and Martin F. Krafft.  (Closes: #377182, #374314)
 
- -- Russ Allbery <rra@debian.org>  Sat, 15 Jul 2006 18:49:37 -0700
+ -- Russ Allbery <rra@debian.org>  Mon, 24 Jul 2006 17:47:50 -0700
 
 lintian (1.23.22) unstable; urgency=low
 



Reply to: