Bug#350228: lintian: false positive package-uses-deprecated-debhelper-compat-version with cdbs
Jay Berkenbilt <qjb@debian.org> writes:
> Package: lintian
> Version: 1.23.15
> Severity: normal
> Tags: patch
> If a package uses cdbs and includes debhelper.mk, then it is using a
> correct debhelper compatibility version of 4. If you don't have a
> debian/compat file that contains 4 (which cdbs will create
> automatically, but may not be in the original sources), you will a
> warning such as this one:
> W: tiff source: package-uses-deprecated-debhelper-compat-version 1
> I believe a sensible fix is to simply recognize that the correct
> dhcompatvalue is 4 if cdbs is in use. The lintian debhelper check
> already makes other assumptions based on cdbs. This one-line patch
> should do the job. It has the unfortunate property of hard-coding the
> number "4" as the current debhelper compat version in another place, but
> that's easily rectified if desirable.
This seems basically reasonable, at least as a starting point. The
obvious elaboration would be to choose this value based on a versioned
build dependency on cdbs, but I think we can wait on doing that until it
looks needed.
> --- checks/debhelper~ 2006-01-19 09:11:59.000000000 -0500
> +++ checks/debhelper 2006-01-27 21:58:02.671089168 -0500
> @@ -93,6 +93,7 @@
> $seencommand = 1;
> $needbuilddepends = 1;
> $needtomodifyscripts = 1;
> + $needversiondepends = $dhcompatvalue = 4;
> } elsif (/^\s*export\s+DH_COMPAT\s*=\s*(\d+)/) {
> $needversiondepends = $1;
> } elsif (/^\s*export\s+DH_COMPAT/) {
This would cause any cdbs package that did have a debian/compat file to
produce warnings about conflicting versions. I don't think that's
correct; I think cdbs is happy to use the debian/compat file that you have
if that's what you want.
I'm going to apply a slightly different patch that doesn't set the compat
level from cdbs until towards the end, and only if no other setting of it
was found.
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: