[lintian] 01/01: Check the "Recommends" field as well when testing scripts for script-needs-depends-on-sensible-utils. (Closes: #879953)
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit a0b1644c1d5d1a7a80fe1125ca3c0276978ed20c
Author: Chris Lamb <lamby@debian.org>
Date: Fri Oct 27 16:37:40 2017 +0100
Check the "Recommends" field as well when testing scripts for script-needs-depends-on-sensible-utils. (Closes: #879953)
---
checks/scripts.pm | 4 +++-
debian/changelog | 3 +++
.../debian/debian/control.in | 12 ++++++++++++
...pt-needs-depends-on-sensible-utils-has-recommends.install | 1 +
...t-needs-depends-on-sensible-utils-has-recommends.postinst | 7 +++++++
5 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/checks/scripts.pm b/checks/scripts.pm
index 5a1243d..efa27b3 100644
--- a/checks/scripts.pm
+++ b/checks/scripts.pm
@@ -247,7 +247,9 @@ sub run {
my $all_parsed = Lintian::Relation->and($info->relation('all'),
$info->relation('provides'),$pkg);
my $str_deps = $info->relation('strong');
- my $has_sensible_utils = $str_deps->implies('sensible-utils');
+ my $has_sensible_utils =
+ Lintian::Relation->and( $str_deps, $info->relation('recommends') )
+ ->implies('sensible-utils');
for my $filename (sort keys %{$info->scripts}) {
my $interpreter = $info->scripts->{$filename}{interpreter};
diff --git a/debian/changelog b/debian/changelog
index 8fcee52..3ccf12a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -54,6 +54,9 @@ lintian (2.5.56) UNRELEASED; urgency=medium
* checks/rules.{pm,desc}:
+ [CL] Warn on packages unnecessararily setting dpkg-architecture(1)
variables. (Closes: #793554)
+ * checks/scripts.desc:
+ + [CL] Check the "Recommends" field as well when testing scripts for
+ script-needs-depends-on-sensible-utils. (Closes: #879953)
* checks/source-changelog.{desc.pm}:
+ [CL] Move latest-debian-changelog-entry-without-new-date tag into a
new check of type "source". (Closes: #873612)
diff --git a/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/control.in b/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/control.in
index d12060c..93b1737 100644
--- a/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/control.in
+++ b/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/control.in
@@ -25,3 +25,15 @@ Description: {$description} (with dependency)
be an empty package.
.
This package has a dependency on sensible-utils.
+
+Package: {$source}-has-recommends
+Architecture: all
+Depends: $\{misc:Depends\}
+Recommends: sensible-utils
+Description: {$description} (with Recommends dependency)
+ 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 package has a Recommends dependency on sensible-utils.
diff --git a/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/scripts-script-needs-depends-on-sensible-utils-has-recommends.install b/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/scripts-script-needs-depends-on-sensible-utils-has-recommends.install
new file mode 100644
index 0000000..9c708a6
--- /dev/null
+++ b/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/scripts-script-needs-depends-on-sensible-utils-has-recommends.install
@@ -0,0 +1 @@
+test-script var/lib/test3
diff --git a/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/scripts-script-needs-depends-on-sensible-utils-has-recommends.postinst b/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/scripts-script-needs-depends-on-sensible-utils-has-recommends.postinst
new file mode 100644
index 0000000..f369cc0
--- /dev/null
+++ b/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/scripts-script-needs-depends-on-sensible-utils-has-recommends.postinst
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+
+sensible-pager
+
+#DEBHELPER#
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: