Author: rra
Date: 2006-06-25 07:01:06 +0200 (Sun, 25 Jun 2006)
New Revision: 687

Modified:
   trunk/checks/fields
   trunk/debian/changelog
Log:
  + [RA] Require ant in Build-Depends when using the CDBS ant rule.
  + [RA] Bypass the build-depends-without-arch-dep check entirely when
    using ant, since determining which Java dependencies are then
    permissible in Build-Depends is too complex to do a proper job.
    Reported by Peter Eisentraut.  (Closes: #372190)

Modified: trunk/checks/fields
===================================================================
--- trunk/checks/fields 2006-06-25 04:02:38 UTC (rev 686)
+++ trunk/checks/fields 2006-06-25 05:01:06 UTC (rev 687)
@@ -43,6 +43,7 @@
 # optional tags to use for reporting the problem if some information other
 # than the default is required.
 my @global_clean_depends = (
+       [ ant => '^include\s*/usr/share/cdbs/1/rules/ant.mk' ],
        [ cdbs => '^include\s+/usr/share/cdbs/' ],
        [ dbs => '^include\s+/usr/share/dbs/' ],
        [ debhelper => '^include\s+/usr/share/cdbs/1/rules/debhelper.mk' ],
@@ -90,6 +91,14 @@
        [ 'perl | perl-base (>= 5.6.0-16)' => 
'(^\t|\|\|)\s*(perl|\$\(PERL\))\s' ],
 );
 
+# A simple list of regular expressions which, if they match anywhere in
+# debian/rules, indicate the requirements for debian/rules clean are complex
+# enough that we can't know what packages are permitted in Build-Depends and
+# should bypass the build-depends-without-arch-dep check completely.
+my @global_clean_bypass = (
+       '^include\s*/usr/share/cdbs/1/rules/ant.mk'
+);
+
 sub run {
 
 my $pkg = shift;
@@ -505,7 +514,7 @@
        # The keys in %needed and %needed_clean are the dependencies; the
        # values are the tags to use or the empty string to use the default
        # tag.
-       my (%needed, %needed_clean, %allowed_clean);
+       my (%needed, %needed_clean, %allowed_clean, $bypass_needed_clean);
        open (RULES, "debfiles/rules") or fail("cannot read debfiles/rules: 
$!");
        my $target = "none";
        local $/ = "\n";        # Read this linewise
@@ -521,6 +530,11 @@
                                $allowed_clean{$rule->[0]} = 1;
                        }
                }
+               for my $rule (@global_clean_bypass) {
+                       if ($_ =~ /$rule/) {
+                               $bypass_needed_clean = 1;
+                       }
+               }
                for my $rule (@global_depends) {
                        if ($_ =~ /$rule->[1]/) {
                                $needed{$rule->[0]} = $rule->[2] || 
$needed{$rule->[0]} || '';
@@ -650,7 +664,7 @@
        # packages so that the implications will work properly.
        #
        # This is confusing.  There should be a better way to do this.
-       if (-e "fields/build-depends" && $arch_dep_packages == 0) {
+       if (-e "fields/build-depends" && $arch_dep_packages == 0 && 
!$bypass_needed_clean) {
                open(FH, "fields/build-depends") or fail("cannot read 
fields/build-depends: $!");
                my $build_depends = <FH>;
                close FH;

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2006-06-25 04:02:38 UTC (rev 686)
+++ trunk/debian/changelog      2006-06-25 05:01:06 UTC (rev 687)
@@ -29,11 +29,16 @@
     + [RA] Downgrade build-depends-without-arch-dep to info from warning.
       Policy doesn't require using Build-Depends-Indep for
       arch-independent packages and the test has a lot of false positives.
+    + [RA] Require ant in Build-Depends when using the CDBS ant rule.
+    + [RA] Bypass the build-depends-without-arch-dep check entirely when
+      using ant, since determining which Java dependencies are then
+      permissible in Build-Depends is too complex to do a proper job.
+      Reported by Peter Eisentraut.  (Closes: #372190)
   * checks/po-debconf:
     + [RA] Don't consider templates.in to be a stray translated template
       file.  Thanks, Thomas Huriaux.  (Closes: #367534)
 
- -- Russ Allbery <[EMAIL PROTECTED]>  Sat, 24 Jun 2006 21:02:32 -0700
+ -- Russ Allbery <[EMAIL PROTECTED]>  Sat, 24 Jun 2006 21:25:29 -0700
 
 lintian (1.23.21) unstable; urgency=low
 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to