Bug#926768: lintian: emit classification tag about VCS and VCS URI
Package: lintian
Version: 2.9.1~bpo9+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 VCS in use by packages, and the VCS
hosting provider. Example such graphs are:
https://blop.info/pub/vcs-stacked.png
https://blop.info/pub/vcs-hosting-stacked.png
Could lintian emit classification tags for this?
Here is a patch that works for me.
Also, there's no tag for packages using an external VCS hoster (such as
github), instead of salsa. That's probably something that would be
useful to add, with a Severity: pedantic or Severity: classification.
- Lucas
diff --git a/checks/fields.desc b/checks/fields.desc
index 7c6620b6f..72e6045cb 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -1493,3 +1493,13 @@ Info: The version number for this package does not comply with the
Derivative distributions of Debian may enforce additional restrictions
on the version in order to ensure that forked (or packages that are
otherwise modified) are marked as such.
+
+Tag: vcs
+Severity: classification
+Certainty: certain
+Info: the VCS used by the package.
+
+Tag: vcs-uri
+Severity: classification
+Certainty: certain
+Info: the VCS URI used by the package.
diff --git a/checks/fields.pm b/checks/fields.pm
index 6411d06c5..6685f7423 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -1346,6 +1346,8 @@ sub run {
tag 'vcs-browser-links-to-empty-view', $uri
if $uri =~ m%rev=0&sc=0%;
} else {
+ tag 'vcs', $vcs;
+ tag 'vcs-uri', $uri;
$seen_vcs{$vcs}++;
foreach my $regex ($KNOWN_VCS_HOSTERS->all) {
foreach my $re_vcs (@{$KNOWN_VCS_HOSTERS->value($regex)}) {
-- 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: