[Pkg-alsa-devel] alsa-tools
Thomas Hood
jdthood at yahoo.co.uk
Fri Dec 30 13:18:32 UTC 2005
Jordi Mallach wrote:
> Oh, btw, I modified alsa-base.modprobe to add the full path for
> modprobe.
I don't like to hard-code program paths, and I can quote some policy to
back this up:
> Programs called from maintainer scripts should not normally have a
> path prepended to them. Before installation is started, the package
> management system checks to see if the programs `ldconfig',
> `start-stop-daemon', `install-info', and `update-rc.d' can be found
> via the `PATH' environment variable. Those programs, and any other
> program that one would expect to be on the `PATH', should thus be
> invoked without an absolute pathname. Maintainer scripts should also
> not reset the `PATH', though they might choose to modify it by
> prepending or appending package-specific directories. These
> considerations really apply to all shell scripts. [6.1]
If "modprobe" is failing on the user's system then either he doesn't have a
sane default PATH or zsh is broken. (Or modprobe isn't passing PATH, but my
testing indicates that this is not the problem.) In either case, other things
are going to break on his system unless many packages hard code paths. And
Debian decided a long time ago that it wasn't going to do that.
The submitter says that other files in /etc/modprobe.d/ include statements to
call modprobe with full path; however, on my systems there are _no_ files
besides alsa-base that include statements to call modprobe. So I am curious
to know what other packages have hard coded modprobe's path.
modprobe's location is unlikely to change, but in principle the admin is
supposed to be able to substitute commands by putting them in /usr/local/bin/
and modifying PATH to include /usr/local/bin before the standard dirs.
--
Thomas
More information about the Pkg-alsa-devel
mailing list