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

[lintian] 01/01: .



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

lamby pushed a commit to branch bad-distribution-in-debian-changelog-873520
in repository lintian.

commit 7e1279b9de46fb9b8813dbe13dfbaaa55768f930
Author: Chris Lamb <lamby@debian.org>
Date:   Tue Aug 29 09:25:51 2017 +0100

    .
---
 checks/changelog-file.desc             | 13 +++++++++++++
 checks/changelog-file.pm               |  7 +++++++
 t/tests/distribution-multiple-bad/tags |  1 +
 3 files changed, 21 insertions(+)

diff --git a/checks/changelog-file.desc b/checks/changelog-file.desc
index df848ac..7f18d95 100644
--- a/checks/changelog-file.desc
+++ b/checks/changelog-file.desc
@@ -420,3 +420,16 @@ Info: The changelog entry references a temporary security identifier,
  please replace the TEMP identifier with a short description of the
  issue.
 Ref: #787929, #807892
+
+Tag: bad-distribution-in-changelog-file
+Severity: important
+Certainty: certain
+Info: You've specified an unknown target distribution for your upload in
+ the <tt>debian/changelog</tt> file.  It is possible that you are uploading
+ for a different distribution than the one Lintian is checking for.  In
+ that case, passing --profile $VENDOR may fix this warning.
+ .
+ Note that the distributions <tt>non-free</tt> and <tt>contrib</tt> are no
+ longer valid. You'll have to use distribution <tt>unstable</tt> and
+ <tt>Section: non-free/xxx</tt> or <tt>Section: contrib/xxx</tt> instead.
+Ref: policy 5.6.14
diff --git a/checks/changelog-file.pm b/checks/changelog-file.pm
index 26b5d7a..bcc4f7e 100644
--- a/checks/changelog-file.pm
+++ b/checks/changelog-file.pm
@@ -38,6 +38,7 @@ use Lintian::Data ();
 
 my $BUGS_NUMBER
   = Lintian::Data->new('changelog-file/bugs-number', qr/\s*=\s*/o);
+my $KNOWN_DISTS = Lintian::Data->new('changes-file/known-dists');
 
 my $SPELLING_ERROR_IN_NEWS
   = spelling_tag_emitter('spelling-error-in-news-debian');
@@ -295,6 +296,12 @@ sub run {
             }
         }
 
+        my $distribution = $entries[0]->Distribution;
+        if (!$KNOWN_DISTS->known($distribution)) {
+            # bad distribution entry
+            tag 'bad-distribution-in-changelog-file', $distribution;
+        }
+
         if (@entries > 1) {
             my $second_timestamp = $entries[1]->Timestamp;
 
diff --git a/t/tests/distribution-multiple-bad/tags b/t/tests/distribution-multiple-bad/tags
index eb545f3..affa071 100644
--- a/t/tests/distribution-multiple-bad/tags
+++ b/t/tests/distribution-multiple-bad/tags
@@ -3,4 +3,5 @@ E: distribution-multiple-bad changes: bad-distribution-in-changes-file bar
 E: distribution-multiple-bad changes: bad-distribution-in-changes-file foo
 E: distribution-multiple-bad changes: bad-distribution-in-changes-file foo-backportss
 E: distribution-multiple-bad changes: multiple-distributions-in-changes-file stable foo-backportss bar foo
+E: distribution-multiple-bad: bad-distribution-in-changelog-file stable foo-backportss bar foo
 I: distribution-multiple-bad changes: backports-changes-missing

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


Reply to: