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

[lintian] 01/01: Warn if packages define multiple compatibility levels in the "compat" file, typically via "echo 11 >> debian/compat" (instead of ">").



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

lamby pushed a commit to branch master
in repository lintian.

commit be078d615a8305646a5fae025c87a8cd4e2f0a8c
Author: Chris Lamb <lamby@debian.org>
Date:   Sat Feb 17 20:02:12 2018 +0000

    Warn if packages define multiple compatibility levels in the "compat" file, typically via "echo 11 >> debian/compat" (instead of ">").
---
 checks/debhelper.desc | 12 ++++++++++++
 checks/debhelper.pm   |  1 +
 debian/changelog      |  4 ++++
 3 files changed, 17 insertions(+)

diff --git a/checks/debhelper.desc b/checks/debhelper.desc
index 26f17b8..a53d4fe 100644
--- a/checks/debhelper.desc
+++ b/checks/debhelper.desc
@@ -183,6 +183,18 @@ Ref: debhelper(7)
 Info: The debhelper compatibility level specified in
  <tt>debian/compat</tt> is not a number.
 
+Tag: debhelper-compat-file-contains-multiple-levels
+Severity: important
+Certainty: certain
+Ref: debhelper(7)
+Info: The <tt>debian/compat</tt> file appears to contain multiple
+ compatibility levels.
+ .
+ This was likely due to the use of &gt;&gt; instead of &gt; when
+ updating the level.
+ .
+ Please update the file to specify a single level.
+
 Tag: debhelper-compatibility-level-not-a-number
 Severity: important
 Certainty: possible
diff --git a/checks/debhelper.pm b/checks/debhelper.pm
index b462c0a..3eead3d 100644
--- a/checks/debhelper.pm
+++ b/checks/debhelper.pm
@@ -282,6 +282,7 @@ sub run {
     if ($compat_file and $compat_file->is_open_ok) {
         my $compat_file = $compat_file->file_contents;
         ($compat) = split(/\n/, $compat_file);
+        tag 'debhelper-compat-file-contains-multiple-levels' if $compat > 1;
         strip($compat);
         if ($compat ne '') {
             my $compat_value = $compat;
diff --git a/debian/changelog b/debian/changelog
index e6a5f1a..4944188 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,10 @@ lintian (2.5.76) UNRELEASED; urgency=medium
   * checks/cruft.pm:
     + [CL] Avoid false-positives in Jush's syntax highlighting definition
       files.
+  * checks/debhelper.{desc,pm}:
+    + [CL] Warn if packages define multiple compatibility levels in the
+      "compat" file, typically via "echo 11 >> debian/compat" (instead of
+      ">").
   * checks/fields.desc:
     + [CL] Correct a grammatical error and tighten up the language of the
       "binary-package-depends-on-toolchain-package" tag's description.

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


Reply to: