[lintian] 01/01: Actually check for a dependency on sensible-utils before emitting script-needs-depends-on-sensible-utils. Thanks to Daniel Reichelt for the detailed bug report. (Closes: #877439)
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit 64db521cdaa6354d3c3c2707e83f4217b8012033
Author: Chris Lamb <lamby@debian.org>
Date: Fri Oct 6 11:29:27 2017 +0100
Actually check for a dependency on sensible-utils before emitting script-needs-depends-on-sensible-utils. Thanks to Daniel Reichelt for the detailed bug report. (Closes: #877439)
---
checks/scripts.pm | 7 ++++--
debian/changelog | 3 +++
.../debian/debian/control.in | 26 ++++++++++++++++++++++
...s-depends-on-sensible-utils-has-depends.install | 1 +
...depends-on-sensible-utils-has-depends.postinst} | 0
...script-needs-depends-on-sensible-utils.install} | 0
...cript-needs-depends-on-sensible-utils.postinst} | 0
7 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/checks/scripts.pm b/checks/scripts.pm
index 287409a..5a1243d 100644
--- a/checks/scripts.pm
+++ b/checks/scripts.pm
@@ -247,6 +247,7 @@ 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');
for my $filename (sort keys %{$info->scripts}) {
my $interpreter = $info->scripts->{$filename}{interpreter};
@@ -350,7 +351,8 @@ sub run {
if (check_script_syntax($interpreter, $path)) {
script_tag('shell-script-fails-syntax-check', $filename);
}
- check_script_uses_sensible_utils($path);
+ check_script_uses_sensible_utils($path)
+ unless $has_sensible_utils;
}
}
@@ -624,7 +626,8 @@ sub run {
if (check_script_syntax("/bin/${base}", $path)) {
tag 'maintainer-shell-script-fails-syntax-check', $file;
}
- check_script_uses_sensible_utils($path);
+ check_script_uses_sensible_utils($path)
+ unless $has_sensible_utils;
}
}
diff --git a/debian/changelog b/debian/changelog
index 45882f5..eef5419 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -26,6 +26,9 @@ lintian (2.5.55) UNRELEASED; urgency=medium
(Closes: #877142)
+ [NT] Apply patch from Mattia Rizzolo to improve the tag description
for script-uses-deprecated-nodejs-location.
+ + [CL] Actually check for a dependency on sensible-utils before
+ emitting script-needs-depends-on-sensible-utils. Thanks to Daniel
+ Reichelt for the detailed bug report. (Closes: #877439)
* checks/watch-file.{pm,desc}:
+ [CL] Warn for debian/watch files using insecure URIs such as HTTP or
FTP, similar to vcs-field-uses-insecure-uri. (Closes: #849515)
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
new file mode 100644
index 0000000..fd4ed73
--- /dev/null
+++ b/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/control.in
@@ -0,0 +1,26 @@
+Source: {$source}
+Priority: optional
+Section: {$section}
+Maintainer: {$author}
+Standards-Version: {$standards_version}
+Build-Depends: {$build_depends}
+
+Package: {$source}
+Architecture: all
+Depends: $\{misc:Depends\}
+Description: {$description}
+ 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: {$source}-has-depends
+Architecture: all
+Depends: $\{misc:Depends\}, sensible-utils
+Description: {$description} (with 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 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-depends.install b/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/scripts-script-needs-depends-on-sensible-utils-has-depends.install
new file mode 100644
index 0000000..cebc38f
--- /dev/null
+++ b/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/scripts-script-needs-depends-on-sensible-utils-has-depends.install
@@ -0,0 +1 @@
+test-script var/lib/test2
diff --git a/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/postinst b/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/scripts-script-needs-depends-on-sensible-utils-has-depends.postinst
similarity index 100%
copy from t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/postinst
copy to t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/scripts-script-needs-depends-on-sensible-utils-has-depends.postinst
diff --git a/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/install b/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/scripts-script-needs-depends-on-sensible-utils.install
similarity index 100%
rename from t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/install
rename to t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/scripts-script-needs-depends-on-sensible-utils.install
diff --git a/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/postinst b/t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/scripts-script-needs-depends-on-sensible-utils.postinst
similarity index 100%
rename from t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/postinst
rename to t/tests/scripts-script-needs-depends-on-sensible-utils/debian/debian/scripts-script-needs-depends-on-sensible-utils.postinst
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: