Bug#330025: lintian: bogus compat check

2007-04-10 Thread Russ Allbery
Luk Claes <[EMAIL PROTECTED]> writes:

> According to joeyh it's appropriate to warn for use of DH_COMPAT at the
> top of the file (before any Makefile target).

Thank you for checking on this!  I'll get this merged for the next
release.

-- 
Russ Allbery ([EMAIL PROTECTED])   


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#330025: lintian: bogus compat check

2007-04-10 Thread Luk Claes
Russ Allbery wrote:
> Luk Claes <[EMAIL PROTECTED]> writes:
> 
>> tags 330025 +patch
>> thanks
> 
>> Hi
> 
>> Easy patch included for consideration.
> 
> Thanks!  At this point I'm tempted to take this, although I think that
> CDBS still uses DH_COMPAT rather than a debian/compat file (but I'm not
> positive, and regardless this sort of check wouldn't catch it).
> 
> However, in a quick check, I can't find any information that substantiates
> the original reporter's assertion that it's deprecated.  The description
> in debhelper's man page is:
> 
>DH_COMPAT
>Temporarily specifies what compatibility level debhelper should run
>at, overriding any value in debian/compat.
> 
> which doesn't sound deprecated.  Maybe it's the "temporarily" that should
> be read as implying that it shouldn't be used as a normal part of
> debian/rules?
> 
> A warning about setting DH_COMPAT in debian/rules is going to catch a
> *lot* of packages, so I want to be sure that it's really the right thing
> to warn about before we do it.

According to joeyh it's appropriate to warn for use of DH_COMPAT at the top of
the file (before any Makefile target).

Applying:

- if (m/^\s*DH_COMPAT(?:\s|:)/) {
- tag "declares-deprecated-DH_COMPAT");
+ if (m/^\s*DH_COMPAT(?=\s|=)/ && keys(%seen) == 0) {
+ tag "declares-deprecated-DH_COMPAT";

in the patch solves that AFAICS :-)

Though the description should also be updated: first try...

N:   As of debhelper version 4, the DH_COMPAT environment variable is
N:   only to be used for temporarily overriding debian/compat, so any command
N:   in debian/rules that sets it on top of debian/rules should be deleted.
N:
N:   Please refer to the debhelper(7) manual page for more information.

Cheers

Luk

-- 
Luk Claes - http://people.debian.org/~luk - GPG key 1024D/9B7C328D
Fingerprint:   D5AF 25FB 316B 53BB 08E7   F999 E544 DE07 9B7C 328D



signature.asc
Description: OpenPGP digital signature


Bug#330025: lintian: bogus compat check

2007-04-09 Thread Russ Allbery
Luk Claes <[EMAIL PROTECTED]> writes:

> tags 330025 +patch
> thanks

> Hi

> Easy patch included for consideration.

Thanks!  At this point I'm tempted to take this, although I think that
CDBS still uses DH_COMPAT rather than a debian/compat file (but I'm not
positive, and regardless this sort of check wouldn't catch it).

However, in a quick check, I can't find any information that substantiates
the original reporter's assertion that it's deprecated.  The description
in debhelper's man page is:

   DH_COMPAT
   Temporarily specifies what compatibility level debhelper should run
   at, overriding any value in debian/compat.

which doesn't sound deprecated.  Maybe it's the "temporarily" that should
be read as implying that it shouldn't be used as a normal part of
debian/rules?

A warning about setting DH_COMPAT in debian/rules is going to catch a
*lot* of packages, so I want to be sure that it's really the right thing
to warn about before we do it.

-- 
Russ Allbery ([EMAIL PROTECTED])   


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#330025: lintian: bogus compat check

2007-04-09 Thread Luk Claes
tags 330025 +patch
thanks

Hi

Easy patch included for consideration.

Cheers

Luk

-- 
Luk Claes - http://people.debian.org/~luk - GPG key 1024D/9B7C328D
Fingerprint:   D5AF 25FB 316B 53BB 08E7   F999 E544 DE07 9B7C 328D
diff -Nru lintian-1.23.28/checks/rules lintian-1.23.28.new/checks/rules
--- lintian-1.23.28/checks/rules2007-03-10 07:55:47.0 +0100
+++ lintian-1.23.28.new/checks/rules2007-04-10 08:38:38.0 +0200
@@ -57,6 +57,10 @@
 while () {
 $includes = 1 if /^ *[s-]?include\s+/;
 
+if (m/^\s*DH_COMPAT(?:\s|:)/) {
+tag "declares-deprecated-DH_COMPAT");
+}
+
 # We're looking only for the required targets.  Ignore everything else.
 next unless /^([^:]+):/;
 my @targets = split (' ', $1);
diff -Nru lintian-1.23.28/checks/rules.desc 
lintian-1.23.28.new/checks/rules.desc
--- lintian-1.23.28/checks/rules.desc   2007-03-10 07:55:47.0 +0100
+++ lintian-1.23.28.new/checks/rules.desc   2007-04-10 08:40:49.0 
+0200
@@ -33,3 +33,10 @@
  of the required targets.  All of build, binary, binary-arch,
  binary-indep, and clean must be provided, even if they don't do anything
  for this package.
+
+Tag: declares-deprecated-DH_COMPAT
+Type: warning
+Info: As of debhelper version 4, the DH_COMPAT environment variable is
+ deprecated, so any command in debian/rules that sets it should be deleted.
+ .
+ Please refer to the debhelper(7) manual page for more information.


signature.asc
Description: OpenPGP digital signature