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

lamby pushed a commit to branch master
in repository lintian.

commit d951d71b164f99c287c4e244eaa15f306e7cb703
Author: Chris Lamb <la...@debian.org>
Date:   Wed Mar 7 22:08:24 2018 -0800

    Don't emit orig-tarball-missing-upstream-signature when the package 
provides a "foo.tar.asc" for a "foo.tar.gz". We previously only checked for a 
"foo.tar.gz.asc". Thanks to Uwe Kleine-König for the report. (Closes: #892255)
---
 checks/changes-file.pm                               | 6 ++++--
 debian/changelog                                     | 5 +++++
 t/tests/changes-upstream-signature-missing/pre_build | 4 ++++
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/checks/changes-file.pm b/checks/changes-file.pm
index 3256ccb..6ca14e4 100644
--- a/checks/changes-file.pm
+++ b/checks/changes-file.pm
@@ -23,6 +23,8 @@ use strict;
 use warnings;
 use autodie;
 
+use List::MoreUtils qw(none);
+
 use Lintian::Tags qw(tag);
 use Lintian::Check qw(check_maintainer);
 use Lintian::Data;
@@ -198,11 +200,11 @@ sub run {
         # Ensure all orig tarballs have a signature if we have an upstream
         # signature.
         if (   $has_signing_key
-            && $file =~ m/\.orig(-[A-Za-z\d-]+)?\.tar\./
+            && $file =~ m/(^.*\.orig(?:-[A-Za-z\d-]+)?\.tar)\./
             && $file !~ m/\.asc$/
             && !$info->repacked) {
             tag 'orig-tarball-missing-upstream-signature', $file
-              unless exists $files->{"$file.asc"};
+              if none { exists $files->{"$_.asc"} } ($file, $1);
         }
 
         # check section
diff --git a/debian/changelog b/debian/changelog
index 8b74ebd..ff109d3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,11 @@ lintian (2.5.79) UNRELEASED; urgency=medium
 
   XXX: generate tag summary
 
+  * checks/changes-file.pm:
+    + [CL] Don't emit orig-tarball-missing-upstream-signature when the
+      package provides a "foo.tar.asc" for a "foo.tar.gz".  We previously
+      only checked for a "foo.tar.gz.asc".  Thanks to Uwe Kleine-König for
+      the report.  (Closes: #892255)
   * checks/changelog-file.pm:
     + [CL] Ignore entries that end with ":" to avoid false-positives in the
       debian-changelog-line-too-short.  Thanks to Mattia Rizollo for the
diff --git a/t/tests/changes-upstream-signature-missing/pre_build 
b/t/tests/changes-upstream-signature-missing/pre_build
index 0afee4d..2d5a158 100755
--- a/t/tests/changes-upstream-signature-missing/pre_build
+++ b/t/tests/changes-upstream-signature-missing/pre_build
@@ -12,3 +12,7 @@ cp ${DIR}/../${NAME}_${VERSION}.orig.tar.gz 
${DIR}/../${NAME}_${VERSION}.orig-co
 # Don't emit if we have a signature
 cp ${DIR}/../${NAME}_${VERSION}.orig.tar.gz 
${DIR}/../${NAME}_${VERSION}.orig-signed.tar.gz
 touch ${DIR}/../${NAME}_${VERSION}.orig-signed.tar.gz.asc
+
+# Don't emit if we have .tar.asc (NB. not a .tar.gz.asc)
+cp ${DIR}/../${NAME}_${VERSION}.orig.tar.gz 
${DIR}/../${NAME}_${VERSION}.orig-noext.tar.gz
+touch ${DIR}/../${NAME}_${VERSION}.orig-noext.tar.gz.asc

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

Reply via email to