lintian: r49 - in trunk: checks debian testset/relations/debian
Author: djpig
Date: 2004-02-21 16:57:09 +0100 (Sat, 21 Feb 2004)
New Revision: 49
Modified:
trunk/checks/fields
trunk/debian/changelog
trunk/testset/relations/debian/control
Log:
Really check only "real" dependency fields for needlessy
depends (Closes: #185035)
Modified: trunk/checks/fields
===================================================================
--- trunk/checks/fields 2004-02-21 15:36:42 UTC (rev 48)
+++ trunk/checks/fields 2004-02-21 15:57:09 UTC (rev 49)
@@ -269,6 +269,18 @@
}
}
+# returns true, if the fieldname is one of 'depends', 'pre-depends',
+# 'recommends' or 'suggests' and false otherwise
+sub is_depends_relation {
+ if ($_[0]) {
+ return ($_[0] eq 'depends'
+ or $_[0] eq 'pre-depends'
+ or $_[0] eq 'recommends'
+ or $_[0] eq 'suggests');
+ }
+ return 1;
+}
+
if ($type eq 'binary') {
for my $fld ('depends', 'pre-depends', 'recommends', 'suggests',
'conflicts', 'provides', 'replaces') {
@@ -299,8 +311,7 @@
my $versioned;
if ($#alternates >= 1) {
- if ($fld ne 'depends' and $fld ne 'recommends' and
- $fld ne 'suggests' and $fld ne 'pre-depends') {
+ unless (is_depends_relation($fld)) {
tag_error("alternates-not-allowed", "$fld:", $conj);
}
}
@@ -333,18 +344,18 @@
$versioned = 0;
}
- if ($relpkg eq "libdb1-compat" and $pkg !~ /^libc(6|6.1|0.3)$/) {
- tag_error("depends-on-libdb1-compat");
- }
+ if (is_depends_relation($fld)) {
+ if ($relpkg eq "libdb1-compat" and $pkg !~ /^libc(6|6.1|0.3)$/) {
+ tag_error("depends-on-libdb1-compat");
+ }
- if ($relpkg eq "awk" and not $versioned) {
- tag_error("needlessly-depends-on-awk");
- }
+ if ($relpkg eq "awk" and not $versioned) {
+ tag_error("needlessly-depends-on-awk");
+ }
- if (not $versioned and
- ($fld eq 'depends' or $fld eq 'pre-depends') and
- exists $known_essential{$relpkg}) {
- tag_error("depends-on-essential-package-without-using-version", $relpkg);
+ if (not $versioned and exists $known_essential{$relpkg}) {
+ tag_error("depends-on-essential-package-without-using-version", $relpkg);
+ }
}
if (not $relpkg =~ m/^$package_re$/so) {
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2004-02-21 15:36:42 UTC (rev 48)
+++ trunk/debian/changelog 2004-02-21 15:57:09 UTC (rev 49)
@@ -1,3 +1,12 @@
+lintian (1.22.12) unstable; urgency=low
+
+ Frank Lichtenheld <djpig@debian.org>
+ * checks/fields:
+ + Really check only "real" dependency fields for needlessy
+ depends (Closes: #185035)
+
+ -- Frank Lichtenheld <djpig@debian.org> Sat, 21 Feb 2004 16:55:27 +0100
+
lintian (1.22.11) unstable; urgency=low
Jeroen van Wolffelaar <jeroen@wolffelaar.nl>
Modified: trunk/testset/relations/debian/control
===================================================================
--- trunk/testset/relations/debian/control 2004-02-21 15:36:42 UTC (rev 48)
+++ trunk/testset/relations/debian/control 2004-02-21 15:57:09 UTC (rev 49)
@@ -24,6 +24,7 @@
Package: relations-multiple-libs
Architecture: all
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
+Provides: awk
Description: Duplicate library dependency relationships.
Duplicate library dependency relationships. This tests the depending on
different versions of the same library at the same time.
Reply to: