[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [SCM] Debian package checker branch, master, updated. 2.5.0-rc1-9-gb88de18



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 2011-03-15 23:21, Russ Allbery wrote:
> Niels Thykier <niels@thykier.net> writes:
> 
>> I am okay with using a pedantic tag for this kind of thing.  Any
>> suggestions for the name?  Current tag is:
>>   package-lacks-versioned-build-depends-on-debhelper
> 
>> So "package-lack-pedantic-versioned-build-depends-on-debhelper"?
> 
> One option would be to rename the existing tag to
> package-needs-versioned-debhelper-build-depends (for when it's actually
> needed or the build may not work) or something similar and keep the
> current tag for the pedantic check.
> 

Over the weekend I deviced the attached patch; the only thing is that it
starts nagging users if they miss a versioned B-D for some dh_* command
they use.  This is great when they would also get the pedantic tag, but
I am not certain how great it is if they get the warning tag for missing
versions.
  Comments welcome.

~Niels


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCAAGBQJNhkoIAAoJEAVLu599gGRCT14P/1aM/fZibtF/jhntA+zchz9j
JOYelI+ibUMe1QrQ3P4jz05newl+VYA4g78PfxNXgfQOBMcGTxQjdx+M2rvcWlAz
oZJAdLZoNsVSJWJ9qp8eb2RdLJxvaC1LHzWU2phO+MiLWNh40YzLWcsJF5r5GZD0
raODh0CRdkjs6oDp8mhOWWSAK41FIevKMlSVH3S+0pX3iX7jQ1BgNMDjXfHlV2h0
q9w0aJWp6p6jRFn3mAzQ82syB54VKVgJmIEaN6rCW9//as6xOYEY1ziJ/OMX5oR4
V1RjNcG/ccsP6OKNfzFcSTiT0LixMBZqQL4OnMCWcUGqNhvhgbgAxE8dlReC1Uy6
LWoExhL3V9OHVeLazi87Z9KvgBvRwNvAoTp6Mz0C5OCczAdOwWIOFOx8dcbzfkAE
10vhUugCyocGlyvoR5T079FHzXb6c2N/lGrQ/OUjUc1hKVyWkTHHHxp+jOEyEzSV
/jCCGUlnzFSfiZPbfrOJrLMg8daMwRLfYfSaecHFsJOzFh4V1FjAf05uATZblZ0H
j8kc2DWtr07nQSgBIcCh9H6id5uLUauQG6wW8uRuGQ+TQK6wuYrn5x7qLEAJ/PxJ
bVgq0xpfVQsBVvGiuSoqKrdDgUFp6UyTmOiVxqZskK5tXjhU0duQa8A8L96puAjO
Mtrx6G28lCqmHpNXdL2x
=Axpt
-----END PGP SIGNATURE-----
>From 3046fb386083578fd564210cd9187260a76ee5b1 Mon Sep 17 00:00:00 2001
From: Niels Thykier <niels@thykier.net>
Date: Sat, 19 Mar 2011 20:37:13 +0100
Subject: [PATCH] Made missing versions on debhelper B-D less than 7 a pedantic tag

---
 checks/debhelper      |   20 +++++++++++++++-----
 checks/debhelper.desc |   18 ++++++++++++++++++
 2 files changed, 33 insertions(+), 5 deletions(-)

diff --git a/checks/debhelper b/checks/debhelper
index ddb5f56..e0a0c3f 100644
--- a/checks/debhelper
+++ b/checks/debhelper
@@ -27,6 +27,10 @@ use Util;
 use Lintian::Data;
 use Lintian::Tags qw(tag);
 
+# If compat is less than or equal to this, then a missing version
+# for this level is only a pedantic issue.
+use constant PEDANTIC_COMPAT => 7;
+
 # If there is no debian/compat file present but cdbs is being used, cdbs will
 # create one automatically.  Currently it always uses compatibility level 5.
 # It may be better to look at what version of cdbs the package depends on and
@@ -329,11 +333,17 @@ while (my ($dep, $command) = each %missingbdeps) {
     tag 'missing-build-dependency-for-dh_-command', "$command=$dep"
 	unless ($bdepends_noarch->implies($dep));
 }
-# debhelper 7 was in Lenny, so an unversioned B-D will guarantee
-# to pull at least debhelper 7.
-if ($level > 7 && not $bdepends->implies("debhelper (>= $level~)")) {
-    tag 'package-lacks-versioned-build-depends-on-debhelper', $level;
-} elsif (@versioncheck or $overridetargets) {
+
+
+unless ($bdepends->implies("debhelper (>= $level~)")){
+    my $tagname = 'package-needs-versioned-debhelper-build-depends';
+    $tagname = 'package-lacks-versioned-build-depends-on-debhelper'
+	if ($level <= PEDANTIC_COMPAT);
+
+    tag $tagname, $level;
+}
+
+if (@versioncheck or $overridetargets) {
     my %seen;
     @versioncheck = grep { !$seen{$_}++ } @versioncheck;
     for my $program (@versioncheck) {
diff --git a/checks/debhelper.desc b/checks/debhelper.desc
index d395516..0b9cbb4 100644
--- a/checks/debhelper.desc
+++ b/checks/debhelper.desc
@@ -21,12 +21,30 @@ Info: If a package uses debhelper, it must declare a Build-Depends
  on debhelper.
 
 Tag: package-lacks-versioned-build-depends-on-debhelper
+Severity: pedantic
+Certainty: certain
+Info: The package either doesn't declare a versioned build dependency on
+ debhelper or does not declare a versioned build dependency on a new
+ enough version of debhelper to satisfy the declared compatibility level.
+ .
+ Recommended practice is to always declare an explicit versioned
+ dependency on debhelper equal to or greater than the compatibility level
+ used by the package, even if the versioned dependency isn't strictly
+ necessary.  Having a versioned dependency also helps with backports to
+ older releases and correct builds on partially updated systems.
+Ref: debhelper(7)
+
+Tag: package-needs-versioned-debhelper-build-depends
 Severity: minor
 Certainty: certain
 Info: The package either doesn't declare a versioned build dependency on
  debhelper or does not declare a versioned build dependency on a new
  enough version of debhelper to satisfy the declared compatibility level.
  .
+ The required version of debhelper is not guaranteed to be satisfied
+ in all supported releases of Debian and therefore this may lead to
+ a build failure.
+ .
  Recommended practice is to always declare an explicit versioned
  dependency on debhelper equal to or greater than the compatibility level
  used by the package, even if the versioned dependency isn't strictly
-- 
1.7.4.1

Attachment: 0001-Made-missing-versions-on-debhelper-B-D-less-than-7-a.patch.sig
Description: Binary data


Reply to: