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

Bug#926766: lintian: emit classification tag about debhelper compat level



Package: lintian
Version: 2.9.1
Severity: wishlist
Tags: patch

Hi,

I'm working on generating historical stats about Debian packages, using
lintian to extract information from packages.

One thing I'd like to track is the debhelper compatibility level in use
by packages. An example graph is
https://blop.info/pub/debhelper-compat-stacked.png

Could lintian emit a classification tag that allows me to track that?

Here is a patch that works for me.

- Lucas


diff --git a/checks/debhelper.desc b/checks/debhelper.desc
index 6cb850637..9ace71e1d 100644
--- a/checks/debhelper.desc
+++ b/checks/debhelper.desc
@@ -388,6 +388,11 @@ Certainty: certain
 Info: This package is using the <tt>debhelper-compat</tt> virtual
  package as a build-dependency.
 
+Tag: debhelper-compat-level
+Severity: classification
+Certainty: certain
+Info: This is the debhelper compat level for the package.
+
 Tag: typo-in-debhelper-override-target
 Severity: normal
 Certainty: possible
diff --git a/checks/debhelper.pm b/checks/debhelper.pm
index 289282ab4..1bdeba30e 100644
--- a/checks/debhelper.pm
+++ b/checks/debhelper.pm
@@ -348,6 +348,10 @@ sub run {
         $compatnan = 1;
     }
 
+    if (defined($level)) {
+        tag 'debhelper-compat-level', $level;
+    }
+
     $level ||= 1;
     if ($level < $compat_level->value('deprecated')) {
         tag 'package-uses-deprecated-debhelper-compat-version', $level;



-- System Information:
Debian Release: 9.8
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (400, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: armhf

Kernel: Linux 4.18.0-0.bpo.1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages lintian depends on:
ii  binutils                          2.28-5
ii  bzip2                             1.0.6-8.1
ii  diffstat                          1.61-1+b1
ii  dpkg                              1.18.25
ii  dpkg-dev                          1.18.25
ii  file                              1:5.30-1+deb9u2
ii  gettext                           0.19.8.1-2
ii  gnupg [gpg]                       2.1.18-8~deb9u4
ii  intltool-debian                   0.35.0+20060710.4
ii  libapt-pkg-perl                   0.1.32
ii  libarchive-zip-perl               1.59-1+deb9u1
ii  libcapture-tiny-perl              0.44-1
ii  libcgi-pm-perl                    4.35-1
ii  libclass-accessor-perl            0.34-1
ii  libclone-perl                     0.38-2+b1
ii  libdpkg-perl                      1.18.25
ii  libemail-valid-perl               1.202-1
ii  libfile-basedir-perl              0.07-1
ii  libio-async-perl                  0.71-1
ii  libipc-run-perl                   0.94-1+deb9u1
ii  liblist-moreutils-perl            0.416-1+b1
ii  libparse-debianchangelog-perl     1.2.0-12
ii  libpath-tiny-perl                 0.100-1
ii  libperl5.24 [libdigest-sha-perl]  5.24.1-3+deb9u5
ii  libtext-levenshtein-perl          0.13-1
ii  libtimedate-perl                  2.3000-2
ii  libtry-tiny-perl                  0.28-1
ii  liburi-perl                       1.71-1
ii  libxml-simple-perl                2.22-1
ii  libyaml-libyaml-perl              0.63-2
ii  man-db                            2.7.6.1-2
ii  patchutils                        0.3.4-2
ii  perl                              5.24.1-3+deb9u5
ii  t1utils                           1.39-2
ii  xz-utils                          5.2.2-1.2+b1

Versions of packages lintian recommends:
ii  libperlio-gzip-perl  0.19-1+b2

Versions of packages lintian suggests:
pn  binutils-multiarch     <none>
ii  libhtml-parser-perl    3.72-3
ii  libtext-template-perl  1.46-1

-- no debconf information


Reply to: