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

[SCM] Debian package checker branch, master, updated. 2.2.17-40-g689b228



The following commit has been merged in the master branch:
commit 689b228232bb6d6b716f3b0ba0afd589c471e8f2
Author: Russ Allbery <rra@debian.org>
Date:   Thu Nov 12 21:49:58 2009 -0800

    Allow arch: all -dev packages to have weaker dependencies
    
    * checks/control-file{,.desc}:
      + [RA] Allow -dev dependencies based on source:Upstream-Version or
        source:Version if the -dev package is architecture: all.  Thanks,
        Mike Hommey.  (Closes: #552729)

diff --git a/checks/control-file b/checks/control-file
index 9014c7c..180be7c 100755
--- a/checks/control-file
+++ b/checks/control-file
@@ -214,9 +214,14 @@ for my $binary_control (@binary_controls) {
 		for my $depend (split /\s*,\s*/, $binary_control->{'depends'}) {
 			my ($target, $version) = ($depend =~ /^([\w.+-]+)(?:\s*\(([^\)]+)\))?/);
 			next unless $target;
-			if ($target =~ /^lib[\w.+-]+\d/ and $target !~ /-dev$/ and grep { $target eq $_ } @package_names) {
-				tag 'weak-library-dev-dependency', "$package on $depend"
-				    unless ($version and $version =~ /^\s*=\s*\$\{(?:binary:Version|Source-Version)\}/);
+			if ($target =~ /^lib[\w.+-]+\d/ and $target !~ /-(?:dev|docs?)$/ and grep { $target eq $_ } @package_names) {
+				if ($binary_control->{'architecture'} eq 'all') {
+					tag 'weak-library-dev-dependency', "$package on $depend"
+					    unless ($version and $version =~ /^\s*[<>]?=\s*\$\{source:(?:Upstream-)?Version\}/);
+				} else {
+					tag 'weak-library-dev-dependency', "$package on $depend"
+					    unless ($version and $version =~ /^\s*=\s*\$\{(?:binary:Version|Source-Version)\}/);
+				}
 			}
 		}
 	}
diff --git a/checks/control-file.desc b/checks/control-file.desc
index 4401ea9..09bdec9 100644
--- a/checks/control-file.desc
+++ b/checks/control-file.desc
@@ -156,3 +156,8 @@ Info: The given package appears to be a shared library -dev package, but
  to the correct files in the shared library package, a -dev package should
  normally use <tt>(= ${binary:Version})</tt> with the dependency on the
  shared library package.
+ .
+ If the -dev package is architecture-independent, it cannot use this
+ dependency since it would break binary NMUs.  Instead, a dependency of
+ <tt>(>= ${source:Upstream-Version}), (<< ${source:Version}.1~)</tt> or
+ similar is usually the correct approach.
diff --git a/debian/changelog b/debian/changelog
index 79b0e10..a70718c 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -35,6 +35,9 @@ lintian (2.2.18) UNRELEASED; urgency=low
     + [RA] build-info-in-binary-control-file-section and
       debian-control-with-duplicate-fields are now serious (ftpmaster
       reject).
+    + [RA] Allow -dev dependencies based on source:Upstream-Version or
+      source:Version if the -dev package is architecture: all.  Thanks,
+      Mike Hommey.  (Closes: #552729)
   * checks/control-files.desc:
     + [RA] not-allowed-control-file, control-file-has-bad-permissions, and
       control-file-has-bad-owner are now serious (ftpmaster reject).
diff --git a/t/tests/control-file-library-dev/debian/debian/control.in b/t/tests/control-file-library-dev/debian/debian/control.in
index 5c0ca7d..dcb7878 100644
--- a/t/tests/control-file-library-dev/debian/debian/control.in
+++ b/t/tests/control-file-library-dev/debian/debian/control.in
@@ -51,7 +51,7 @@ Description: {$description} (shared lib 3)
 
 Package: libcontrol-file-doc
 Section: doc
-Architecture: {$architecture}
+Architecture: all
 Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
 Description: {$description} (doc package)
  Doc package.
@@ -70,3 +70,17 @@ Description: {$description} (dev package with version)
  This is a test package designed to exercise some feature or tag of
  Lintian.  It is part of the Lintian test suite and may do very odd
  things.  It should not be installed like a regular package.
+
+Package: libcontrol-file-all-dev
+Section: libdevel
+Architecture: all
+Depends: $\{shlibs:Depends\}, $\{misc:Depends\}, libcontrol-file-doc,
+ libcontrol-file-foo1 (>= $\{source:Upstream-Version\}),
+ libcontrol-file-foo1 (<= $\{source:Version\}.1~),
+ libcontrol-file-baz9-4 (>= $\{source:Version\})
+Description: {$description} (arch: all dev package)
+ Architecture-independent development package.
+ .
+ This is a test package designed to exercise some feature or tag of
+ Lintian.  It is part of the Lintian test suite and may do very odd
+ things.  It should not be installed like a regular package.
diff --git a/t/tests/control-file-library-dev/desc b/t/tests/control-file-library-dev/desc
index c5df11c..5c05d36 100644
--- a/t/tests/control-file-library-dev/desc
+++ b/t/tests/control-file-library-dev/desc
@@ -1,5 +1,6 @@
 Testname: control-file-library-dev
 Sequence: 6000
 Version: 1.0
+Architecture: any
 Description: Check control file handling of library dev packages
 Test-For: weak-library-dev-dependency

-- 
Debian package checker


Reply to: