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

[lintian] 01/01: First support for Build-Depends-Arch and Build-Conflicts-Arch



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 40a15c79d8d480317accae95d764215c753c44e0
Author: Mattia Rizzolo <mattia@debian.org>
Date:   Fri Apr 22 22:36:41 2016 +0000

    First support for Build-Depends-Arch and Build-Conflicts-Arch
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 checks/fields.desc                                      |  6 ++++++
 checks/fields.pm                                        | 14 +++++++++++---
 data/common/source-fields                               |  2 ++
 debian/changelog                                        |  2 ++
 .../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, 45 insertions(+), 3 deletions(-)

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..d456077 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -946,15 +946,19 @@ 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 +1117,11 @@ 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/debian/changelog b/debian/changelog
index 2a36413..2248f98 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -32,6 +32,8 @@ lintian (2.5.44) UNRELEASED; urgency=medium
     + [NT] Bump known python 3 version to include 3.4 and 3.5.
     + [AB] package-relation-with-perl-modules: Remove "experimental" flag.
       Asked for by Dominic Hargreaves.
+    + [NT] Apply patch from Mattia Rizzolo to make lintian know and check
+      the Build-Depends-Arch field.  (Closes: #822281)
   * checks/files.pm:
     + [JW] Apply patch from Mathieu Parent to fix directories for PHP INI
       files.
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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: