lintian: r570 - in trunk: checks debian
Author: rra
Date: 2006-03-12 02:38:11 +0100 (Sun, 12 Mar 2006)
New Revision: 570
Modified:
trunk/checks/debhelper
trunk/debian/changelog
Log:
+ [RA] CDBS sets DH_COMPAT to 4 but doesn't export it. It does create
debian/compat with that value if none was present. Reflect this
behavior to avoid spurious compat level warnings when using CDBS.
Based on a patch by Jay Berkenbilt. (Closes: #350228)
Modified: trunk/checks/debhelper
===================================================================
--- trunk/checks/debhelper 2006-03-12 00:34:26 UTC (rev 569)
+++ trunk/checks/debhelper 2006-03-12 01:38:11 UTC (rev 570)
@@ -39,7 +39,15 @@
my $needversiondepends = '';
my $seenversiondepends = '0';
my $compat = '';
+my $usescdbs = '';
+# If there is no debian/compat file present but cdbs is being used, cdbs will
+# create one automatically. Currently it always uses compatibility level 4.
+# It may be better to look at what version of cdbs the package depends on and
+# from that derive the compatibility level....
+
+my $cdbscompat = 4;
+
# Parse the debian/rules file, and try to figure out if debhelper commands
# are run in it that like to modify maintainer scripts. Those debhelper
# commands can be found by "grep -l autoscript /usr/bin/dh_*", but I'll
@@ -93,6 +101,11 @@
$seencommand = 1;
$needbuilddepends = 1;
$needtomodifyscripts = 1;
+
+ # CDBS sets DH_COMPAT but doesn't export it. It does, however, create
+ # a debian/compat file if none was found; that logic is handled later.
+ $dhcompatvalue = $cdbscompat;
+ $usescdbs = 1;
} elsif (/^\s*export\s+DH_COMPAT\s*:?=\s*(\d+)/) {
$needversiondepends = $1;
} elsif (/^\s*export\s+DH_COMPAT/) {
@@ -183,6 +196,9 @@
}
closedir(DEBIAN);
+if ($usescdbs and not $needversiondepends) {
+ $needversiondepends = $cdbscompat;
+}
$needversiondepends ||= 1;
if ($needversiondepends < 4) {
tag "package-uses-deprecated-debhelper-compat-version", $needversiondepends;
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2006-03-12 00:34:26 UTC (rev 569)
+++ trunk/debian/changelog 2006-03-12 01:38:11 UTC (rev 570)
@@ -12,6 +12,10 @@
* checks/debhelper:
+ [RA] Recognize setting DH_COMPAT with := in addition to = in
debian/rules. (Closes: #349272)
+ + [RA] CDBS sets DH_COMPAT to 4 but doesn't export it. It does create
+ debian/compat with that value if none was present. Reflect this
+ behavior to avoid spurious compat level warnings when using CDBS.
+ Based on a patch by Jay Berkenbilt. (Closes: #350228)
* checks/fields:
+ [RA] Allow a quilt build-dependency for arch-independent packages if
the quilt makefile rules are included. (Closes: #349273)
Reply to: