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

[lintian] 01/01: c…/scripts.desc: Improve desc. for command-with-path-in-maintainer-script



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

abe pushed a commit to branch master
in repository lintian.

commit fff24791cb95221d4fe52d8e877165daf11d4131
Author: Axel Beckert <abe@deuxchevaux.org>
Date:   Thu Dec 7 01:25:20 2017 +0100

    c…/scripts.desc: Improve desc. for command-with-path-in-maintainer-script
    
    Bascially there are two cases of "if [ -x /usr/bin/<command> ]; …"
    in maintainer scripts:
    
    A) The maintainer controls the checked path (and doesn't forget to
       update the maintainer script in case he ever changes the program's
       path).
    
    B) The maintainer doesn't control the checked path. (See #769845 and
       https://lists.debian.org/debian-devel/2014/11/msg00044.html for real
       examples.)
    
    Overriding this tag in case (A) is ok if the maintainer indeed doesn't
    forget to also update the maintainer scripts if he changes the path.
    
    But case (B) is a real issue and should be fixed and not overridden,
    because the maintainer script definitely behaves worse if the wrong
    path (e.g. a path only valid in earlier Debian releases) is used in
    the check.
---
 checks/scripts.desc | 14 +++++++++-----
 debian/changelog    |  6 ++++++
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/checks/scripts.desc b/checks/scripts.desc
index 804ebcb..f839f78 100644
--- a/checks/scripts.desc
+++ b/checks/scripts.desc
@@ -681,11 +681,15 @@ Info: The indicated program run in a maintainer script has a prepended
  and prepending a path may prevent the local administrator from using a
  replacement version of a command for some local reason.
  .
- If the path is required to test a program for existence, one of the suggested
- workarounds in the developer's reference can be used.
- .
- See particularly the function pathfind() in devref.
-Ref: policy 6.1, devref 6.4
+ If the path is used to test a program for existence, please use <tt>if
+ which $program > /dev/null; then …</tt>.
+ .
+ If you intent to override this tag, please make sure that you are in
+ control of the installation path of the according program and that
+ you won't forget to change this maintainer script, too, if you ever
+ move that program around.
+Ref: policy 6.1, devref 6.4, #769845, #807695,
+ https://lists.debian.org/debian-devel/2014/11/msg00044.html
 
 Tag: package-uses-local-diversion
 Severity: serious
diff --git a/debian/changelog b/debian/changelog
index aca4fdb..cedc65f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,12 @@ lintian (2.5.62) UNRELEASED; urgency=medium
       "python2.7".  (Closes: #883053)
     + [CL] Detect an invalid debian/po/POTFILES.in instead of bailing out.
       (Closes: #883653)
+  * checks/scripts.desc:
+    + [AB] command-with-path-in-maintainer-script: Add more references,
+      especially the reason why "if [ -x /usr/bin/<command> ]; …" is
+      indeed bad (#769845 and the mail referred to in there). Rewrite
+      recommendations, explain what conditions should be given if someone
+      intents to override this tag. (Closes: #807695)
 
   * data/spelling/corrections:
     + [AB] Remove "publically". It's a seldom, but valid English word

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


Reply to: