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

[SCM] Debian package checker branch, master, updated. 2.5.4-69-g20ba3c9



The following commit has been merged in the master branch:
commit 20ba3c9e877d14333a036d7165515b42ddc352d3
Author: Niels Thykier <niels@thykier.net>
Date:   Thu Dec 22 15:57:03 2011 +0100

    Allow "pkg (= ${source:Version})" for arch:all -dev dependencies
    
    Allow a -dev package to have a "pkg (= ${source:Version})" relation
    with its library if the library is architecture all.  This is the case
    with a lot of mono-libraries.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/checks/control-file b/checks/control-file
index 1f98f59..81c1525 100644
--- a/checks/control-file
+++ b/checks/control-file
@@ -233,7 +233,7 @@ for my $binary_control (@binary_controls) {
 
     # If this looks like a -dev package, check its dependencies.
     if ($package =~ /-dev$/ and $binary_control->{'depends'}) {
-        check_dev_depends($package, $binary_control->{depends},
+        check_dev_depends ($info, $package, $binary_control->{depends},
                   @package_names);
     }
 
@@ -286,7 +286,7 @@ for my $i (0 .. $#descriptions) {
 # have a version restriction that's at least as strict as the same upstream
 # version.
 sub check_dev_depends {
-    my ($package, $depends, @packages) = @_;
+    my ($info, $package, $depends, @packages) = @_;
     $depends =~ s/^\s+//;
     $depends =~ s/\s+$//;
     for my $target (@packages) {
@@ -315,11 +315,20 @@ sub check_dev_depends {
         # they know what they're doing.
         if (@depends == 1) {
             unless ($versions[0] =~ /^\s*=\s*\$\{(?:binary:Version|Source-Version)\}/) {
+                # Allow "pkg (= ${source:Version})" if (but only if)
+                # the target is an arch:all package.  This happens
+                # with a lot of mono-packages.
+                #
+                # Note, we do not check if the -dev package is
+                # arch:all as well.  The version-substvars check
+                # handles that for us.
+                next if ($info->binary_field ($target, 'architecture')//'') eq 'all'
+                    && $versions[0] =~ /^\s*=\s*\$\{source:Version\}/;
                 tag 'weak-library-dev-dependency', "$package on $depends[0]";
             }
         } elsif (@depends == 2) {
-            unless ($versions[0] =~ /^\s*<[=<]\s*\$\{(?:(?:binary|source):(?:Upstream-)?Version|Source-Version)\}/
-                and $versions[1] =~ /^\s*>[=>]\s*\$\{(?:(?:binary|source):(?:Upstream-)?Version|Source-Version)\}/) {
+            unless    ($versions[0] =~ /^\s*<[=<]\s*\$\{(?:(?:binary|source):(?:Upstream-)?Version|Source-Version)\}/
+                    && $versions[1] =~ /^\s*>[=>]\s*\$\{(?:(?:binary|source):(?:Upstream-)?Version|Source-Version)\}/) {
                 tag 'weak-library-dev-dependency', "$package on $depends[0], $depends[1]";
             }
         }
diff --git a/debian/changelog b/debian/changelog
index 5115522..7242153 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,11 @@ lintian (2.5.5) UNRELEASED; urgency=low
     + [NT] Fixed assumptions about certain fields being present.
       Where needed, Lintian will make guesses to the most likely
       value (or the least "broken" value).
+  * checks/control-file:
+    + [NT] Allow "pkg (= ${source:Version})" versioned dependency if
+      pkg is architecture all.  This fixes a false-positive
+      "weak-library-dev-dependency" for some mono packages.  Thanks
+      to David Bremner for the report.  (Closes: #652602)
   * checks/cruft:
     + [NT] Added dh-autoreconf as a build-depends alternative to
       libtool for suppressing ancient-libtool warning.  Thanks to

-- 
Debian package checker


Reply to: