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

[lintian] 01/01: Warn about Multi-Arch: same packages that ship architecture-specific Lintian overrides. Thanks to Sebastian Ramacher for the report. (Closes: #787469)



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

lamby pushed a commit to branch master
in repository lintian.

commit 4575daa2fcb96bfab67b8dfa56d474a726cfc191
Author: Chris Lamb <lamby@debian.org>
Date:   Mon Jan 29 08:34:08 2018 +1100

    Warn about Multi-Arch: same packages that ship architecture-specific Lintian overrides. Thanks to Sebastian Ramacher for the report. (Closes: #787469)
---
 checks/fields.desc |  7 +++++++
 checks/fields.pm   | 11 +++++++++++
 debian/changelog   |  3 +++
 3 files changed, 21 insertions(+)

diff --git a/checks/fields.desc b/checks/fields.desc
index e501299..4579212 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -1408,3 +1408,10 @@ Info: Based on the content of the maintainer and uploader fields this
  .
  It is recommended that shared maintenance of packages are co-ordinated
  via a revision control system.
+
+Tag: multi-arch-same-package-has-arch-specific-overrides
+Severity: normal
+Certainty: certain
+Info: The specified file contains architecture-specific Lintian overrides
+ but this package is declared as <tt>Multi-Arch: same</tt>.
+Ref: https://lintian.debian.org/manual/section-2.4.html#section-2.4.3, #787406
diff --git a/checks/fields.pm b/checks/fields.pm
index cef7533..c0a3509 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -354,6 +354,17 @@ sub run {
             $arch =~ s/\n//o;
             tag 'illegal-multi-arch-value', $arch, $march if ($arch eq 'all');
         }
+
+    }
+
+    if ($type eq 'source') {
+        for my $bin ($info->binaries) {
+            my $arch = $info->binary_field($bin, 'architecture');
+            my $fname = "debian/$bin.lintian-overrides.$arch";
+            next unless $info->binary_field($bin, 'multi-arch', '') eq 'same';
+            tag 'multi-arch-same-package-has-arch-specific-overrides', $fname
+              if $info->index_resolved_path($fname);
+        }
     }
 
     if ($type eq 'binary'){
diff --git a/debian/changelog b/debian/changelog
index f2c1d16..31b87a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,9 @@ lintian (2.5.73) UNRELEASED; urgency=medium
   * checks/fields.{desc,pm}:
     + [CL] Add a pedantic warning for co-maintained packages that are not
       managed in a revision control system.  (Closes: #884497)
+    + [CL] Warn about Multi-Arch: same packages that ship
+      architecture-specific Lintian overrides. Thanks to Sebastian
+      Ramacher for the report.  (Closes: #787469)
   * checks/patch-systems.{desc,pm}:
     + [CL] Emit a pedantic warning for packages that are using the dpatch
       patch system.  (Closes: #884500)

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


Reply to: