lintian: r1328 - in trunk: checks debian testset testset/relations/debian
Author: rra
Date: 2008-06-03 00:00:00 +0200 (Tue, 03 Jun 2008)
New Revision: 1328
Modified:
trunk/checks/control-file
trunk/checks/control-file.desc
trunk/debian/changelog
trunk/testset/relations/debian/control
trunk/testset/tags.relations
Log:
* checks/control-file{.desc,}:
+ [RA] Check for self-dependencies in the source package since the
current dpkg-gencontrol silently fixes them but they may indicate
other problems. Thanks, Patrick Matth?\195?\164i. (Closes: #471740)
Modified: trunk/checks/control-file
===================================================================
--- trunk/checks/control-file 2008-06-02 21:31:54 UTC (rev 1327)
+++ trunk/checks/control-file 2008-06-02 22:00:00 UTC (rev 1328)
@@ -81,11 +81,17 @@
# of a weaker dependency field. dpkg-gencontrol will fix this up for us, but
# we want to check the source package since dpkg-gencontrol may silently "fix"
# something that's a more subtle bug.
+#
+# Also check if a package declares a simple dependency on itself, since
+# similarly dpkg-gencontrol will clean this up for us but it may be a sign of
+# another problem.
my @dep_fields = qw(pre-depends depends recommends suggests);
for my $control (@binary_controls) {
for my $strong (0 .. ($#dep_fields - 1)) {
next unless $control->{$dep_fields[$strong]};
my $parsed = Dep::parse ($control->{$dep_fields[$strong]});
+ tag "package-depends-on-itself", $control->{package}, $dep_fields[$strong]
+ if Dep::implies($parsed, Dep::parse($control->{package}));
for my $weak (($strong + 1) .. $#dep_fields) {
next unless $control->{$dep_fields[$weak]};
for my $dependency (split /\s*,\s*/, $control->{$dep_fields[$weak]}) {
Modified: trunk/checks/control-file.desc
===================================================================
--- trunk/checks/control-file.desc 2008-06-02 21:31:54 UTC (rev 1327)
+++ trunk/checks/control-file.desc 2008-06-02 22:00:00 UTC (rev 1328)
@@ -65,7 +65,7 @@
Tag: stronger-dependency-implies-weaker
Type: warning
-Ref: 7.2
+Ref: policy 7.2
Info: In the <tt>debian/control</tt> stanza for the given package, a
stronger dependency field implies one of the dependencies in a weaker
dependency field. In other words, the Depends field of the package
@@ -76,3 +76,12 @@
removing the weaker dependency, but it may indicate a more subtle bug
(misspelling or forgetting to remove the stronger dependency when it was
moved to the weaker field).
+
+Tag: package-depends-on-itself
+Type: warning
+Ref: policy 7.2
+Info: The given package declares a dependency on itself in its
+ <tt>debian/control</tt> stanza. Current versions of dpkg-gencontrol will
+ silently fix this problem by removing the dependency, but it may indicate
+ a more subtle bug (misspelling or cutting and pasting the wrong package
+ name).
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-06-02 21:31:54 UTC (rev 1327)
+++ trunk/debian/changelog 2008-06-02 22:00:00 UTC (rev 1328)
@@ -1,5 +1,9 @@
lintian (1.23.50) unstable; urgency=low
+ * checks/control-file{.desc,}:
+ + [RA] Check for self-dependencies in the source package since the
+ current dpkg-gencontrol silently fixes them but they may indicate
+ other problems. Thanks, Patrick Matthäi. (Closes: #471740)
* checks/md5sums:
+ [FL] Don't complain about missing md5sums file if the
package only contains conffiles. (Closes: #482869)
Modified: trunk/testset/relations/debian/control
===================================================================
--- trunk/testset/relations/debian/control 2008-06-02 21:31:54 UTC (rev 1327)
+++ trunk/testset/relations/debian/control 2008-06-02 22:00:00 UTC (rev 1328)
@@ -36,7 +36,7 @@
Section: non-free/misc
Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3, xorg, ${shlibs:Depends}
Provides: awk
-Recommends: ${shlibs:Depends}
+Recommends: ${shlibs:Depends}, relations-multiple-libs
Description: Duplicate library dependency relationships.
Duplicate library dependency relationships.
This tests the depending on different versions of the same library
Modified: trunk/testset/tags.relations
===================================================================
--- trunk/testset/tags.relations 2008-06-02 21:31:54 UTC (rev 1327)
+++ trunk/testset/tags.relations 2008-06-02 22:00:00 UTC (rev 1328)
@@ -33,6 +33,8 @@
W: relations source: ancient-standards-version 3.1.1 (current is 3.7.3)
W: relations source: bad-homepage lintian.debian.org
W: relations source: build-depends-on-1-revision build-depends-indep: libfoo (>= 1.2-1)
+W: relations source: package-depends-on-itself relations depends
+W: relations source: package-depends-on-itself relations-multiple-libs recommends
W: relations source: package-has-a-duplicate-build-relation foo (= 3) [!amd64 !i386], foo (<< 4) [!amd64 !i386]
W: relations source: package-has-a-duplicate-build-relation perl, perl (>= 5.0)
W: relations source: redundant-origin-field
Reply to: