Package: lintian
Version: 2.5.43
Severity: wishlist
Tags: patch
so, I noticed that even if lintian has support in for B-D-A
actually it really doesn't deal with it, rising tags about unknown
fields instead of actually checking them.
Attached there is a first patch adding something for it.
I'm very bad at inventing names, and I'm sure you have better ideas for
the name of what I named
build-depends-arch-without-arch-dependant-binary :>
While pondering, keep in mind that dpkg has support for those since
2012, sbuild since 2011, but policy know nothing about it yet. Also,
currently 5 packages only in the whole archive use B-D-A, but none uses
B-C-A.
No need to say, I'd like to use it, and split B-D into B-D-I+B-D-A
everywhere I can.
--
regards,
Mattia Rizzolo
GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 .''`.
more about me: https://mapreri.org : :' :
Launchpad user: https://launchpad.net/~mapreri `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia `-
From 4b3ffb48693c1698a7b1ae18c27bf1ce1a5ffe78 Mon Sep 17 00:00:00 2001
From: Mattia Rizzolo <mattia@debian.org>
Date: Fri, 22 Apr 2016 22:36:41 +0000
Subject: [PATCH] first support for Build-Depends-Arch and Build-Conflicts-Arch
---
checks/fields.desc | 6 ++++++
checks/fields.pm | 9 ++++++---
data/common/source-fields | 2 ++
.../fields-dep-without-arch-dep-binary/debian/Makefile | 5 +++++
.../debian/debian/control.in | 17 +++++++++++++++++
t/tests/fields-dep-without-arch-dep-binary/desc | 6 ++++++
t/tests/fields-dep-without-arch-dep-binary/tags | 1 +
7 files changed, 43 insertions(+), 3 deletions(-)
create mode 100644 t/tests/fields-dep-without-arch-dep-binary/debian/Makefile
create mode 100644 t/tests/fields-dep-without-arch-dep-binary/debian/debian/control.in
create mode 100644 t/tests/fields-dep-without-arch-dep-binary/desc
create mode 100644 t/tests/fields-dep-without-arch-dep-binary/tags
diff --git a/checks/fields.desc b/checks/fields.desc
index 8495abb..f187b9e 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -705,6 +705,12 @@ Ref: policy 7.7
Info: The control file specifies source relations for architecture-independent
packages, but no architecture-independent packages are built.
+Tag: build-depends-arch-without-arch-dependant-binary
+Severity: important
+Certainty: certain
+Info: The control file specifies source relations for architecture-dependant
+ packages, but not architecture-dependant packages are built.
+
Tag: build-conflicts-with-build-dependency
Severity: important
Certainty: certain
diff --git a/checks/fields.pm b/checks/fields.pm
index ec86f84..aca887c 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -946,15 +946,18 @@ sub run {
tag 'build-depends-indep-without-arch-indep'
if (defined $info->field('build-depends-indep')
&& $arch_indep_packages == 0);
+ tag 'build-depends-arch-without-arch-dependant-binary'
+ if (defined $info->field('build-depends-arch')
+ && $arch_dep_packages == 0);
my $is_dep_field = sub {
- any { $_ eq $_[0] } qw(build-depends build-depends-indep);
+ any { $_ eq $_[0] } qw(build-depends build-depends-indep build-depends-arch);
};
my $restrictions_used = 0;
my %depend;
for my $field (
- qw(build-depends build-depends-indep build-conflicts build-conflicts-indep)
+ qw(build-depends build-depends-indep build-depends-arch build-conflicts build-conflicts-indep build-conflicts-arch)
) {
if (defined $info->field($field)) {
#Get data and clean it
@@ -1113,7 +1116,7 @@ sub run {
}
# Make sure build dependencies and conflicts are consistent.
- for ($depend{'build-conflicts'}, $depend{'build-conflicts-indep'}) {
+ for ($depend{'build-conflicts'}, $depend{'build-conflicts-indep'}, $depend{'build-conflicts-arch'}) {
next unless $_;
for my $conflict (split /\s*,\s*/, $_) {
if ($build_all->implies($conflict)) {
diff --git a/data/common/source-fields b/data/common/source-fields
index df1aa7d..8886812 100644
--- a/data/common/source-fields
+++ b/data/common/source-fields
@@ -6,8 +6,10 @@ autobuild
binary
bugs
build-conflicts
+build-conflicts-arch
build-conflicts-indep
build-depends
+build-depends-arch
build-depends-indep
checksums-md5
checksums-sha1
diff --git a/t/tests/fields-dep-without-arch-dep-binary/debian/Makefile b/t/tests/fields-dep-without-arch-dep-binary/debian/Makefile
new file mode 100644
index 0000000..6df56c1
--- /dev/null
+++ b/t/tests/fields-dep-without-arch-dep-binary/debian/Makefile
@@ -0,0 +1,5 @@
+all:
+
+install:
+ install -d -m 0755 "$(DESTDIR)/usr/lib/package"
+ echo "Hallo World" > "$(DESTDIR)/usr/lib/package/some-file"
diff --git a/t/tests/fields-dep-without-arch-dep-binary/debian/debian/control.in b/t/tests/fields-dep-without-arch-dep-binary/debian/debian/control.in
new file mode 100644
index 0000000..1a64ae8
--- /dev/null
+++ b/t/tests/fields-dep-without-arch-dep-binary/debian/debian/control.in
@@ -0,0 +1,17 @@
+Source: {$source}
+Priority: extra
+Section: devel
+Maintainer: {$author}
+Standards-Version: {$standards_version}
+Build-Depends: debhelper (>= 9)
+Build-Depends-Arch: some-package
+
+Package: {$source}
+Architecture: all
+Depends: $\{misc:Depends\},
+Description: {$description}
+ This is a test package designed to exercise some feature or tag of
+ Lintian. It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package. It may
+ be an empty package.
+
diff --git a/t/tests/fields-dep-without-arch-dep-binary/desc b/t/tests/fields-dep-without-arch-dep-binary/desc
new file mode 100644
index 0000000..d63bc4a
--- /dev/null
+++ b/t/tests/fields-dep-without-arch-dep-binary/desc
@@ -0,0 +1,6 @@
+Testname: fields-dep-without-arch-dep-binary
+Sequence: 6000
+Version: 1.0
+Description: Test for B-D-A and no architecture-dependant pkgs
+Test-For:
+ build-depends-arch-without-arch-dependant-binary
diff --git a/t/tests/fields-dep-without-arch-dep-binary/tags b/t/tests/fields-dep-without-arch-dep-binary/tags
new file mode 100644
index 0000000..6ee7460
--- /dev/null
+++ b/t/tests/fields-dep-without-arch-dep-binary/tags
@@ -0,0 +1 @@
+E: fields-dep-without-arch-dep-binary source: build-depends-arch-without-arch-dependant-binary
--
2.8.1
Attachment:
signature.asc
Description: PGP signature