Bug#712394: lintian: Warn if override_dh_auto_test target doesn't check for DEB_BUILD_OPTIONS=nocheck

2018-02-04 Thread Chris Lamb
Chris Lamb wrote:

> We might just end up reverting the whole thing, naturally, but let's see
> how we go for now...

Some results coming in:

  
https://lintian.debian.org/tags/override_dh_auto_test-does-not-check-DEB_BUILD_PROFILES.html

Thoughts?


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#712394: lintian: Warn if override_dh_auto_test target doesn't check for DEB_BUILD_OPTIONS=nocheck

2018-01-29 Thread Chris Lamb
Hi Mattia,

> This is going to trigger tons of false positives for packages doing
> something like:
> 
> override_dh_auto_test:
> FOO=bar dh_auto_test
> -rm -f file-containing-test-output

Thanks. I've incorporated your idea in:

  
https://anonscm.debian.org/git/lintian/lintian.git/commit/?id=c1a33d5f43b5662d55cfdf76573d90125dfb3cef

… and lowered the severity here:

  
https://anonscm.debian.org/git/lintian/lintian.git/commit/?id=c1a33d5f43b5662d55cfdf76573d90125dfb3cef

We might just end up reverting the whole thing, naturally, but let's see
how we go for now...


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#712394: lintian: Warn if override_dh_auto_test target doesn't check for DEB_BUILD_OPTIONS=nocheck

2018-01-29 Thread Mattia Rizzolo
On Mon, Jan 29, 2018 at 08:24:47PM +0530, Chris Lamb wrote:
> Fixed in Git, pending upload:
> 
>   
> https://anonscm.debian.org/git/lintian/lintian.git/commit/?id=deaf67c91e17072d7963b457c9a7f16c2ee309e4

That commit does the following:
+if (my $line = $overridden{'dh_auto_test'}) {
+tag 'override_dh_auto_test-does-not-check-DEB_BUILD_PROFILES',
+  "(line $line)"
+  if $rules_per_target{'override_dh_auto_test'}
+  and none { m/(DEB_BUILD_OPTIONS|nocheck)/ } @conditionals;
+}

This is going to trigger tons of false positives for packages doing
something like:

override_dh_auto_test:
FOO=bar dh_auto_test
-rm -f file-containing-test-output

which is otherwise file and respects DEB_BUILD_OPTIONS=nocheck.

I think it's very hard to properly detect such cases, but a way to avoid
all those fpos would be to exclude the tags from overrides containing a
call to dh_auto_test: this will lead to some false negatives (for
packages that in their override_dh_auto_test do something that effectly
is not idenpotent and probably causes ftbfs for nocheck, or stuff like
that), but it's probably a lot better than the many fpos I can think of.

-- 
regards,
Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540  .''`.
more about me:  https://mapreri.org : :'  :
Launchpad user: https://launchpad.net/~mapreri  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-


signature.asc
Description: PGP signature


Bug#712394: lintian: Warn if override_dh_auto_test target doesn't check for DEB_BUILD_OPTIONS=nocheck

2018-01-29 Thread Chris Lamb
tags 712394 + pending
thanks

Fixed in Git, pending upload:

  
https://anonscm.debian.org/git/lintian/lintian.git/commit/?id=deaf67c91e17072d7963b457c9a7f16c2ee309e4


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-