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

Bug#926767: lintian: emit classification tag about patch system in use



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 usage of source formats, and for 1.0,
the usage of patch systems. An example graph is 
https://blop.info/pub/patch-systems-stacked.png

Could lintian emit a classification tag allowing me to track that?
The patch below works for me.

Also, I noticed that lintian currently ignores simple-patchsys.mk, other
than reporting, for example:
W: notify-python source: debian-rules-uses-deprecated-makefile line 3 /usr/share/cdbs/1/rules/simple-patchsys.mk

This patch system is still widely used according to
https://codesearch.debian.net/search?q=simple-patchsys.mk+path%3Adebian%2Frules

Thanks!

Lucas


diff --git a/checks/patch-systems.desc b/checks/patch-systems.desc
index 033c7fb3c..bce93cd9e 100644
--- a/checks/patch-systems.desc
+++ b/checks/patch-systems.desc
@@ -247,3 +247,8 @@ Info: The specified series file is a vendor-specific patch series file.
  such differing source packages or modify the build process to behave
  conditionally or to conditionally patch files explicitly.
 Ref: #904302, https://lists.debian.org/debian-devel-announce/2018/11/msg00004.html
+
+Tag: patch-system
+Severity: classification
+Certainty: certain
+Info: the patch system used by the package (if any)
diff --git a/checks/patch-systems.pm b/checks/patch-systems.pm
index 69f0b59b0..b720a7f85 100644
--- a/checks/patch-systems.pm
+++ b/checks/patch-systems.pm
@@ -63,6 +63,7 @@ sub run {
     #----- dpatch
     if ($build_deps->implies('dpatch')) {
         my $list_file;
+        tag 'patch-system', 'dpatch';
         tag 'package-uses-deprecated-dpatch-patch-system';
         $uses_patch_system++;
         $list_file = $dpdir->resolve_path('00list') if $dpdir;
@@ -147,6 +148,7 @@ sub run {
         if (not $patch_series or not $patch_series->is_open_ok) {
             tag 'quilt-build-dep-but-no-series-file' unless $quilt_format;
         } else {
+            tag 'patch-system', 'quilt';
             my (@patches, @badopts);
             my $series_fd = $patch_series->open;
             while (my $patch = <$series_fd>) {

-- 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: