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

[SCM] Debian package checker branch, master, updated. 2.3.3-82-g81bc014



The following commit has been merged in the master branch:
commit de398d8a9cf62928d78d8913c80a45d2ccf61c3c
Author: Russ Allbery <rra@debian.org>
Date:   Sun Mar 21 21:50:13 2010 -0700

    Check rule regexes in more places and check for dh --with quilt
    
    * checks/rules:
      + [RA] Also check binary-independent and wildcard rules for programs
        requiring build dependencies, but accept them in either
        Build-Depends or Build-Depends-Indep.
      + [RA] Check for a quilt dependency when the debhelper 7 quilt module
        is used.  Thanks, Martin Meredith.  (Closes: #548094)

diff --git a/checks/rules b/checks/rules
index c001895..0fe3217 100644
--- a/checks/rules
+++ b/checks/rules
@@ -76,6 +76,7 @@ my @RULE_CLEAN_DEPENDS =
      [ $PYTHON_DEPEND => qr'^\t\s*python\s', 'missing-python-build-dependency' ],
      [ $PYTHON_DEPEND => qr'\ssetup\.py\b', 'missing-python-build-dependency' ],
      [ 'quilt (>= 0.46-7~)' => qr'^\t\s*dh_quilt_.+' ],
+     [ 'quilt (>= 0.46-7~)' => qr'^\t\s*dh\s.*--with\s+(?:\S+,)*quilt' ],
      [ quilt => qr'^\t\s*(\S+=\S+\s+)*quilt\s' ],
      [ yada => qr'^\t\s*yada\s' ],
     );
@@ -140,6 +141,7 @@ my $includes = 0;
 my %seen;
 local $_;
 my @arch_rules = (qr/^clean$/, qr/^binary-arch$/, qr/^build-arch$/);
+my @indep_rules = (qr/^build$/, qr/^build-indep$/, qr/^binary-indep$/);
 my @current_targets;
 my %rules_per_target;
 my %debhelper_group;
@@ -239,11 +241,13 @@ while (<RULES>) {
     	# targets and check whether debhelper programs are called in a
     	# reasonable order.
 	if (m/^\s+[^\#]/) {
-            my $arch = 0;
+            my ($arch, $indep) = (0, 0);
             for my $target (@current_targets) {
                 $rules_per_target{$target} ||= [];
                 push @{$rules_per_target{$target}}, $_;
                 $arch = 1 if (grep { $target =~ /$_/ } @arch_rules);
+                $indep = 1 if (grep { $target =~ /$_/ } @indep_rules);
+                $indep = 1 if $target eq '%';
             }
             if ($arch) {
                 for my $rule (@RULE_CLEAN_DEPENDS) {
@@ -252,7 +256,14 @@ while (<RULES>) {
                             = $rule->[2] || $needed_clean{$rule->[0]} || '';
                     }
                 }
-	    }
+	    } elsif ($indep) {
+                for my $rule (@RULE_CLEAN_DEPENDS) {
+                    if (/$rule->[1]/ and not $maybe_skipping) {
+                        $needed{$rule->[0]}
+                            = $rule->[2] || $needed{$rule->[0]} || '';
+                    }
+                }
+            }
             if (m/^\s+(dh_\S+)\b/ and $debhelper_order{$1}) {
                 my $command = $1;
                 my ($package) = /\s(?:-p|--package=)(\S+)/;
@@ -299,6 +310,7 @@ if ($architecture eq "all" && scalar @{$rules_per_target{'binary-arch'}}) {
 my $build_regular = $info->relation('build-depends');
 my $build_indep   = $info->relation('build-depends-indep');
 for my $package (keys %needed_clean) {
+    delete $needed{$package};
     my $tag = $needed_clean{$package} || 'missing-build-dependency';
     unless ($build_regular->implies($package)) {
         if ($build_indep->implies($package)) {
diff --git a/debian/changelog b/debian/changelog
index 24a602a..90ecf74 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -83,6 +83,11 @@ lintian (2.3.4) UNRELEASED; urgency=low
     + [RG] Warn about installing files specifying the destination
       directory with PREFIX when Perl's MakeMaker build system is used.
       Based on a patch by Niko Tyni.  (Closes: #568748)
+    + [RA] Also check binary-independent and wildcard rules for programs
+      requiring build dependencies, but accept them in either
+      Build-Depends or Build-Depends-Indep.
+    + [RA] Check for a quilt dependency when the debhelper 7 quilt module
+      is used.  Thanks, Martin Meredith.  (Closes: #548094)
   * checks/scripts{,.desc}:
     + [ADB] Update the list of octave interpreters, adding octave3.2
       (Closes: #574048) and removing octave2.1 (only available in lenny
diff --git a/t/source/control-field-traversal-3/rules b/t/tests/rules-dh-with-quilt/debian/debian/rules
similarity index 52%
copy from t/source/control-field-traversal-3/rules
copy to t/tests/rules-dh-with-quilt/debian/debian/rules
index cbe925d..931d500 100755
--- a/t/source/control-field-traversal-3/rules
+++ b/t/tests/rules-dh-with-quilt/debian/debian/rules
@@ -1,3 +1,3 @@
 #!/usr/bin/make -f
 %:
-	dh $@
+	dh $@ --with quilt
diff --git a/t/tests/rules-dh-with-quilt/desc b/t/tests/rules-dh-with-quilt/desc
new file mode 100644
index 0000000..98833de
--- /dev/null
+++ b/t/tests/rules-dh-with-quilt/desc
@@ -0,0 +1,5 @@
+Testname: rules-dh-with-quilt
+Sequence: 6000
+Version: 1.0
+Description: Check dependency requirements for dh --with quilt
+Test-For: missing-build-dependency
diff --git a/t/tests/rules-dh-with-quilt/tags b/t/tests/rules-dh-with-quilt/tags
new file mode 100644
index 0000000..acfc114
--- /dev/null
+++ b/t/tests/rules-dh-with-quilt/tags
@@ -0,0 +1 @@
+E: rules-dh-with-quilt source: missing-build-dependency quilt (>= 0.46-7~)

-- 
Debian package checker


Reply to: