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

[SCM] Debian package checker branch, master, updated. 2.2.18-50-g814d389



The following commit has been merged in the master branch:
commit 7a3b0beff3b85ba21ee9aaa81e7f3a4d48e110e4
Author: Russ Allbery <rra@debian.org>
Date:   Thu Dec 24 15:16:01 2009 -0800

    Check for < and > version dependencies in debian/control
    
    * checks/control-file{,.desc}:
      + [RA] Check for < and > version dependencies in debian/control since
        dpkg-source helpfully rewrites and fixes them in binary packages.
        Thanks, Jakub Wilk.  (Closes: #557971)

diff --git a/checks/control-file b/checks/control-file
index 9ac6668..fc448d7 100644
--- a/checks/control-file
+++ b/checks/control-file
@@ -105,6 +105,10 @@ for my $binary_control (@binary_controls) {
 # The architecture list can contain things that look like packages separated
 # by spaces, so we have to remove any architecture restrictions first.  This
 # unfortunately distorts our report a little, but hopefully not too much.
+#
+# Also check for < and > relations.  dpkg-source warns about them and then
+# transforms them in the output to <= and >=, but it's easy to miss the error
+# message.
 for my $control ($header, @binary_controls) {
 	for my $field (qw(pre-depends depends recommends suggests breaks
 			  conflicts provides replaces enhances
@@ -132,6 +136,11 @@ for my $control ($header, @binary_controls) {
 			    ($control->{source} ? 'source' : $control->{package}),
 			    "$field field between '$prev' and '$next'";
 		}
+		while ($value =~ /([^\s\(]+\s*\([<>]\s*[^<>=]+\))/g) {
+			tag 'obsolete-relation-form-in-source', 'in',
+			    ($control->{source} ? 'source' : $control->{package}),
+			    "$field: $1";
+		}
 	}
 }
 
diff --git a/checks/control-file.desc b/checks/control-file.desc
index 09bdec9..366ba71 100644
--- a/checks/control-file.desc
+++ b/checks/control-file.desc
@@ -139,6 +139,14 @@ Info: The given field in the <tt>debian/control</tt> file contains a list
  missed between two items.  This can lead to bogus or incomplete
  dependencies, conflicts etc.
 
+Tag: obsolete-relation-form-in-source
+Ref: policy 7.1
+Severity: normal
+Certainty: certain
+Info: The forms "&lt;" and "&gt;" mean "&lt;=" and "&gt;=", not "&lt;&lt;"
+ and "&gt;&gt;" as one might expect.  These forms were marked obsolete and
+ should no longer be used.  Use the longer forms instead.
+
 Tag: package-depends-on-hardcoded-libc
 Severity: normal
 Certainty: certain
diff --git a/debian/changelog b/debian/changelog
index 5304831..fab733d 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 lintian (2.3.0) UNRELEASED; urgency=low
 
   * Summary of tag changes:
+    + Added:
+      - obsolete-relation-form-in-source
     + Removed:
       - build-depends-without-arch-dep
 
@@ -12,6 +14,10 @@ lintian (2.3.0) UNRELEASED; urgency=low
     + [ADB] Exempt all binary packages built from the zlib source from
       the embedded-zlib test, not just those with binary package names
       matching zlib.+.  Thanks, Mark Brown.
+  * checks/control-file{,.desc}:
+    + [RA] Check for < and > version dependencies in debian/control since
+      dpkg-source helpfully rewrites and fixes them in binary packages.
+      Thanks, Jakub Wilk.  (Closes: #557971)
   * checks/cruft:
     + [RA] Allow an automake or libtool dependency in Build-Depends-Indep
       to also satisfy the check for outdated helper files.  Thanks,
diff --git a/t/tests/control-file-general/debian/debian/control.in b/t/tests/control-file-general/debian/debian/control.in
index 3fd6ab3..7b58933 100644
--- a/t/tests/control-file-general/debian/debian/control.in
+++ b/t/tests/control-file-general/debian/debian/control.in
@@ -9,6 +9,7 @@ Build-Depends: debhelper (>= 7),
  2) [
  sparc i386 amd64
  ]
+Build-Depends-Indep: perl (> 5.8)
 X-VCS-Svn: svn://svn.example.com/{$srcpkg}/trunk
 
 Package: {$srcpkg}
@@ -28,6 +29,7 @@ Package: {$srcpkg}-1
 Section: {$section}
 Architecture: {$architecture}
 Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
+Conflicts: libsqlite3-0 (< 3.6.12)
 Description: {$description}
  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
diff --git a/t/tests/control-file-general/tags b/t/tests/control-file-general/tags
index ec31f26..425b88f 100644
--- a/t/tests/control-file-general/tags
+++ b/t/tests/control-file-general/tags
@@ -4,6 +4,8 @@ I: control-file-general source: binary-control-field-duplicates-source field "ma
 I: control-file-general source: duplicate-long-description control-file-general control-file-general-1 control-file-general-2 control-file-general-3 control-file-general-4
 I: control-file-general source: duplicate-short-description control-file-general control-file-general-1
 W: control-file-general source: no-section-field-for-source
+W: control-file-general source: obsolete-relation-form-in-source in control-file-general-1 conflicts: libsqlite3-0 (< 3.6.12)
+W: control-file-general source: obsolete-relation-form-in-source in source build-depends-indep: perl (> 5.8)
 W: control-file-general source: package-depends-on-itself control-file-general depends
 W: control-file-general source: stronger-dependency-implies-weaker control-file-general depends -> recommends foo
 W: control-file-general source: stronger-dependency-implies-weaker control-file-general depends -> suggests bar | baz

-- 
Debian package checker


Reply to: