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

Bug#825047: marked as done (developers-reference: Lintian contradicts suggestion in maintainer scripts best practices)



Your message dated Sat, 15 Sep 2018 17:52:17 +0200
with message-id <439ff8d2eaf8443e6476af56ba39ecc37a09ede0.camel@debian.org>
and subject line Re: developers-reference: Lintian contradicts suggestion in maintainer scripts best practices
has caused the Debian Bug report #825047,
regarding developers-reference: Lintian contradicts suggestion in maintainer scripts best practices
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
825047: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=825047
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: developers-reference
Version: 3.4.17
Severity: normal

I have a package with a postrm script that has a line like

[ -x /usr/bin/ucf ] && ucf --purge /etc/default/gridengine

which incurs the following lintian warning:

W: gridengine-common: command-with-path-in-maintainer-script postrm:31 /usr/bin/ucf
N: 
N:    The indicated program run in a maintainer script has a prepended path.
N:    Programs called from maintainer scripts normally should not have a path
N:    prepended. dpkg ensures that the PATH is set to a reasonable value, and
N:    prepending a path may prevent the local administrator from using a
N:    replacement version of a command for some local reason.
N:    
N:    If the path is required to test a program for existence, one of the
N:    suggested workarounds in the developer's reference can be used.
N:    
N:    See particularly the function pathfind() in devref.
N:    
N:    Refer to Debian Policy Manual section 6.1 (Introduction to package
N:    maintainer scripts) and Debian Developer's Reference section 6.4 (Best
N:    practices for maintainer scripts) for details.
N:    
N:    Severity: normal, Certainty: certain
N:    
N:    Check: scripts, Type: binary

However, in the developer's reference (section 6.4), we have:

~~~
 If you need to check for the existence of a command, you should use something like

if [ -x /usr/sbin/install-docs ]; then ...

If you don't wish to hard-code the path of a command in your maintainer script,...
~~~

Given the lintian warning above, the first suggestion quoted here probably should not be made in the Developer's reference.


Many thanks and regards
Afif

--- End Message ---
--- Begin Message ---
Source: developers-reference
Version: 3.4.20

This has been fixed with commit

https://salsa.debian.org/debian/developers-reference/commit/51b79d4dfc417d4f9649cf7dadef4eecbc0399cb
, uploaded with version 3.4.20.

--
tobi

--- End Message ---

Reply to: