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

lintian: r856 - in trunk: checks debian



Author: rra
Date: 2007-04-25 00:58:08 +0200 (Wed, 25 Apr 2007)
New Revision: 856

Modified:
   trunk/checks/copyright-file
   trunk/debian/changelog
Log:
  + [RA] Replace yet another hand-rolled dependency parser with Dep.

Modified: trunk/checks/copyright-file
===================================================================
--- trunk/checks/copyright-file	2007-04-24 22:51:34 UTC (rev 855)
+++ trunk/checks/copyright-file	2007-04-24 22:58:08 UTC (rev 856)
@@ -20,6 +20,7 @@
 
 package Lintian::copyright_file;
 use strict;
+use Dep;
 use Tags;
 use Util;
 
@@ -229,20 +230,9 @@
 	close(I);
     }
 
-    for (split(/\s*,\s*/,"$deps,$predeps")) {
-    	# Now split the dep
-	# We don't allow alternatives, as we need a strong depends: The dependency
-	# has to be there whatever happens.
-	if (/^\s* ( [^\s\[\(]+ ) \s* (?:\( \s* (<=|<|=|>=|>>|>) \s* ([^(]+) \))?\s*$/x) {
-	    my ($d_pkg, $d_relation, $d_version) = ($1, ($2 || ""), ($3 || ""));
-	    return 1 if (($package eq $d_pkg));
-	    # We won't check for a strict dependency, for practical
-	    # reasons, it's sometimes preferred
-	    # # and ($d_relation eq "=") and ($d_version eq $version));
+    return 1 if Dep::implies(Dep::parse($deps), Dep::parse($package));
+    return 1 if Dep::implies(Dep::parse($predeps), Dep::parse($package));
 
-	}
-    }
-
     return 0;
 }
 

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2007-04-24 22:51:34 UTC (rev 855)
+++ trunk/debian/changelog	2007-04-24 22:58:08 UTC (rev 856)
@@ -7,6 +7,7 @@
   * checks/copyright-file:
     + [RA] Exclude the Affero General Public License from the check for
       references to the shared GPL copy.  (Closes: #420077)
+    + [RA] Replace yet another hand-rolled dependency parser with Dep.
   * checks/fields:
     + [RA] The CDBS Python rules only call pycentral or pysupport during
       the binary targets, so those dependencies can be safely moved to
@@ -27,7 +28,7 @@
       program its maintainer scripts use.  Thanks, Daniel Leidert.
       (Closes: #419461)
 
- -- Russ Allbery <rra@debian.org>  Tue, 24 Apr 2007 15:51:23 -0700
+ -- Russ Allbery <rra@debian.org>  Tue, 24 Apr 2007 15:58:03 -0700
 
 lintian (1.23.29) unstable; urgency=low
 



Reply to: