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

[lintian] 01/01: Correct logic 588cbc9069b5 to actually check the priority field & add a test.



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

lamby pushed a commit to branch master
in repository lintian.

commit c6e09ef24bd391f6eec922f4001ad8a9a17b8882
Author: Chris Lamb <lamby@debian.org>
Date:   Sat Dec 16 10:10:47 2017 +0000

    Correct logic 588cbc9069b5 to actually check the priority field & add a test.
---
 checks/fields.pm                                           |  4 ++--
 .../debian/debian/control.in                               | 14 +++++++++++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/checks/fields.pm b/checks/fields.pm
index af97090..f5cb671 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -594,8 +594,8 @@ sub run {
 
         tag 'excessive-priority-for-library-package', $priority
           if $pkg =~ m/^lib.+-dev$/o
-          and $info->field('section', '') eq 'libdevel';
-           any { $_ eq $priority } qw(required important standard)
+          and $info->field('section', '') eq 'libdevel'
+          and any { $_ eq $priority } qw(required important standard);
     }
 
     #---- Standards-Version
diff --git a/t/tests/fields-excessive-priority-for-library-package/debian/debian/control.in b/t/tests/fields-excessive-priority-for-library-package/debian/debian/control.in
index 98669a3..7cc7981 100644
--- a/t/tests/fields-excessive-priority-for-library-package/debian/debian/control.in
+++ b/t/tests/fields-excessive-priority-for-library-package/debian/debian/control.in
@@ -1,5 +1,4 @@
 Source: {$source}
-Priority: optional
 Section: libs
 Maintainer: {$author}
 Standards-Version: {$standards_version}
@@ -16,3 +15,16 @@ Description: {$description} (dev)
  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.
+
+Package: lib{$source}-false-positive-dev
+Architecture: {$architecture}
+Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
+Section: libdevel
+Priority: optional
+Description: {$description} (false positive)
+ 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.
+ .
+ (This is a false positive)

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


Reply to: