--- Begin Message ---
- To: submit@bugs.debian.org
- Subject: Check for source in main with only binaries in contrib
- From: Ivo De Decker <ivodd@debian.org>
- Date: Sun, 28 Apr 2019 18:28:25 +0200
- Message-id: <20190428162822.fwtgz6ur4t4udn3t@debian.org>
package: lintian
tags: patch
Hi,
Please add a check for a source in main which has only binaries in contrib.
Sources in main can have binaries in contrib, but only if they also have
binaries in main.
When debugging #824169, I noticed that the handling of this case in dak is
inconsistent. Rather than fixing that, it might be better to add a check for
this case, as it isn't allowed anyway.
The attached patch has an attempt to implement this, by emitting the
section-area-mismatch in this case. It also updates the description of this
tag to clarify this case.
Thanks,
Ivo
commit 716a666eef1af720c6893cdf4d42b7bc31dc2be7
Author: Ivo De Decker <ivodd@debian.org>
Date: Sun Apr 28 18:17:01 2019 +0200
Check for source in main with only binaries in contrib
diff --git a/checks/control-file.desc b/checks/control-file.desc
index 16e20ce53..08f9d6fb3 100644
--- a/checks/control-file.desc
+++ b/checks/control-file.desc
@@ -103,7 +103,8 @@ Info: The <tt>debian/control</tt> file places the indicated binary package
package or other binary packages built from the same source package. The
source package and any binary packages it builds must be in the same
area of the archive, with the single exception that source packages in
- main may also build binary packages in contrib.
+ main may also build binary packages in contrib if they build binary packages
+ in main.
Tag: xs-vcs-field-in-debian-control
Severity: wishlist
diff --git a/checks/control-file.pm b/checks/control-file.pm
index 0287d9691..e9686b269 100644
--- a/checks/control-file.pm
+++ b/checks/control-file.pm
@@ -278,6 +278,8 @@ sub run {
tag 'no-section-field-for-source';
}
my @descriptions;
+ my $bininmain = 0;
+ my $binincontrib = 0;
foreach my $bin (@package_names) {
# Accumulate the description.
@@ -295,6 +297,7 @@ sub run {
# Check mismatches in archive area.
$bin_area = $info->binary_field($bin, 'section');
+ $bininmain = 1 if (!$bin_area and $area eq "main");
next unless $area && $bin_area;
if ($bin_area =~ m%^([^/]+)/%) {
@@ -302,12 +305,17 @@ sub run {
} else {
$bin_area = 'main';
}
+ $bininmain = 1 if ($bin_area eq 'main');
+ $binincontrib = 1 if ($bin_area eq 'contrib');
next
if $area eq $bin_area
or ($area eq 'main' and $bin_area eq 'contrib');
tag 'section-area-mismatch', 'Package', $bin;
}
+ if ($binincontrib and !$bininmain and $area eq "main") {
+ tag 'section-area-mismatch';
+ }
# Check for duplicate descriptions.
my (%seen_short, %seen_long);
--- End Message ---
--- Begin Message ---
Source: lintian
Source-Version: 2.14.0
We believe that the bug you reported is fixed in the latest version of
lintian, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 928126@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Chris Lamb <lamby@debian.org> (supplier of updated lintian package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Wed, 22 May 2019 07:47:56 +0000
Source: lintian
Binary: lintian
Architecture: source all
Version: 2.14.0
Distribution: unstable
Urgency: medium
Maintainer: Debian Lintian Maintainers <lintian-maint@debian.org>
Changed-By: Chris Lamb <lamby@debian.org>
Description:
lintian - Debian package checker
Closes: 927970 928126 928617
Changes:
lintian (2.14.0) unstable; urgency=medium
.
[ Chris Lamb ]
* Correct false-positives in missing-systemd-timer-for-cron-script due to
an incorrect regular expression. Thanks to Francesco Poli (wintermute)
for the patch. (Closes: #927970)
* Adjust package-contains-python-header-in-incorrect-directory as Python
3.8 dropped the "m" modifier that was used in Python 3.7 and below (eg.
/usr/include/python3.7m). (Closes: #928617)
.
[ Ivo De Decker ]
* Check for sources in the "main" section with only binaries in the
"contrib" section. (Closes: #928126)
.
[ Michael Biebl ]
* Consider the now-preferred /usr/share/dbus-1/{system,session}.d
directories (supported since dbus 1.9.18) when checking D-Bus services.
(MR: !187)
.
[ Xavier ]
* Fix an error where debian/tests/pkg-js/files contained deep (but valid)
directory. (MR: !199)
.
[ Paul Wise ]
* Add/fix several spelling corrections.
* Sort the dictionary
* Prefer American spelling for American typos
Checksums-Sha1:
3e8d55c4a948e245175a43f487940c8d86e454f4 3878 lintian_2.14.0.dsc
9578ebc31223011327548846339db1c1272af3c1 1713196 lintian_2.14.0.tar.xz
e2d551fe609f46296203caab7cfd1d679f089e95 1180072 lintian_2.14.0_all.deb
95538737dc90a170662640b2df9c2bae83747bf7 18114 lintian_2.14.0_amd64.buildinfo
Checksums-Sha256:
f40ac2cbce301a9331a1971aa92265f186a991a185a69e7081de85f39741e92d 3878 lintian_2.14.0.dsc
76962c76a0a35ff5fbcecc535f00ab58b10d3eee4b2dcae26fd9c9d2540309b6 1713196 lintian_2.14.0.tar.xz
3c19d1cc8b933a1efdd108e2f0956b2905f0540913a6c1392a90cb1762023cde 1180072 lintian_2.14.0_all.deb
57a87af37a955e6fd1813fa56130cd1f2fc504dc959e9a319b4665c6ee08b27d 18114 lintian_2.14.0_amd64.buildinfo
Files:
e7fd1107caebfc2509cd57608e91e59c 3878 devel optional lintian_2.14.0.dsc
541af73c6e4d513cef4c2cb6f5579ebd 1713196 devel optional lintian_2.14.0.tar.xz
97c97dd744ca843518dabedb3d9786fa 1180072 devel optional lintian_2.14.0_all.deb
eafc835de5c9beafb439808e1f73e863 18114 devel optional lintian_2.14.0_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEwv5L0nHBObhsUz5GHpU+J9QxHlgFAlzlD04ACgkQHpU+J9Qx
Hliu6g//enaLBbkUBtdscPqdWs9QRJp3WHWs5HlLA0b143gYz5z5F1HciRJ9DMlf
mmy4zSe1IoNcF9e4R/ttQbHek3CydK2TznyFc190zQ6XDv2B/rF+MVg5DSzvEJdZ
g6F93MJ7wGvRYjIRz0EbYpoa1J7zu7UGStT5fmJd+b5O2kTqph60F9SopswA0xsc
2iHCUUFjILfsQPTk7gtRUjCHhYBEvLYtjH1xSC1LP5N1YaS2M/BBIYMZGPQCm3CP
CxL2UuNHfToNmHGwyhNWrcgyRTCulIDo4zzjQGqbTTfc1jx7VlWT4F2zG7vA6zLe
T4L/PbA/hTY00vWfT2a7/vABP1gQQ9yK7lcCPiZyVWjJuPK6U/iLHiIWRCQ7huoJ
t/V2xhPmopH5Jg3FmERxlXys6qYW0zv1zV9JUCmkuTIeJsHHE114h2tsah7R3U8/
l4Xb57EesRxcAAHDYSN4pBGLL9kxkoA8elDxL8trsHG/4bROkdCVUs9bvgixl7xn
GnSKonNJ4kkXdMIjXI/u+Fj90SmHNEz2MZ+tlu0mj3cs7IEWFkDyeQbfDwVPxitj
Ip19W9Hczhr0epFe1Hfm8wOxYnVMUmrpAFl29n9pcWLy64HY024Jqg6LG6IX5q+q
itzeHIjLyXn0l7cni/1VbsvXn47NVgyu6QsO1jk2IBQHt09KR1I=
=1ptl
-----END PGP SIGNATURE-----
--- End Message ---