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

Bug#376184: lintian: please warn about maintscripts with needlessly prefixed paths



Raphael Geissert <atomo64@gmail.com> writes:

> +		if (m,^$LEADIN(/(usr/(local/)?)?s?bin/\w+),) {
> +		    tag "useless-std-path-in-maintainer-script", "$file:$. $1";
> +		}

Nothing in dpkg ensures that /usr/local is in the path.  Running programs
out of /usr/local/bin is probably wrong for *other* reasons, but it's a
separate issue than this.

> +Tag: useless-std-path-in-maintainer-script
> +Type: warning
> +Ref: policy 6.1
> +Info: The script runs an executable which has a, useless, path that is
> + included in the default $PATH.

The root problem isn't that it's useless; it does have an effect, one that
we don't want.  It prevents the local system administrator from getting
the preferred version of some command by changing the PATH.  (It also
suppresses shell built-ins, which may be intentional, but we'll see if
anyone complains about that and make exceptions as needed.)

Applied with a changed name and description and without /usr/local in the
paths that it looks for.

Thanks, particularly for including a test suite!

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: