[lintian] 01/01: Handle non-dev packages for excessive-priority-for-library-package.
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit 41599f6d0b2f23e013886fe7d4e214a865ed6a4f
Author: Josh Triplett <josh@joshtriplett.org>
Date: Sat Dec 16 09:12:16 2017 -0800
Handle non-dev packages for excessive-priority-for-library-package.
Exclude packages ending in -bin (for libc-bin and future-proofing) and
libc packages.
Expand the test accordingly.
Signed-off-by: Chris Lamb <lamby@debian.org>
---
checks/fields.pm | 6 +++--
.../debian/debian/control.in | 27 +++++++++++++++++++++-
.../tags | 1 +
3 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/checks/fields.pm b/checks/fields.pm
index f5cb671..37c4a90 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -593,8 +593,10 @@ sub run {
unless $KNOWN_PRIOS->known($priority);
tag 'excessive-priority-for-library-package', $priority
- if $pkg =~ m/^lib.+-dev$/o
- and $info->field('section', '') eq 'libdevel'
+ if $pkg =~ m/^lib/o
+ and $pkg !~ m/-bin$/o
+ and $pkg !~ m/^libc[0-9.]+$/o
+ and any { $_ eq $info->field('section', '') } qw(libdevel libs)
and any { $_ eq $priority } qw(required important standard);
}
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 7cc7981..2bb8a69 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
@@ -5,6 +5,16 @@ Standards-Version: {$standards_version}
Build-Depends: {$build_depends}
Rules-Requires-Root: no
+Package: lib{$source}42
+Architecture: {$architecture}
+Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
+Priority: important
+Description: {$description} (lib)
+ 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.
+
Package: lib{$source}-dev
Architecture: {$architecture}
Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
@@ -15,6 +25,21 @@ 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.
+ .
+ (This is a dev package.)
+
+Package: lib{$source}-false-positive-bin
+Architecture: {$architecture}
+Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
+Section: libdevel
+Priority: required
+Description: {$description} (false positive bin)
+ 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 -bin false positive)
Package: lib{$source}-false-positive-dev
Architecture: {$architecture}
@@ -27,4 +52,4 @@ Description: {$description} (false positive)
things. It should not be installed like a regular package. It may
be an empty package.
.
- (This is a false positive)
+ (This is a -dev false positive)
diff --git a/t/tests/fields-excessive-priority-for-library-package/tags b/t/tests/fields-excessive-priority-for-library-package/tags
index 22cee04..1b388a4 100644
--- a/t/tests/fields-excessive-priority-for-library-package/tags
+++ b/t/tests/fields-excessive-priority-for-library-package/tags
@@ -1 +1,2 @@
W: libfields-excessive-priority-for-library-package-dev: excessive-priority-for-library-package standard
+W: libfields-excessive-priority-for-library-package42: excessive-priority-for-library-package important
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: