On 23/12/2014 19:38, Colin Booth wrote:
My confusion was two-fold. First, I'd have expected --enable-slashpackage to jam /command into the built-in path.
Well, slashpackage is not slashcommand. I like slashpackage because it offers guarantees - albeit small ones - as soon as one package follows the convention; /command, on the other hand, only offers guarantees if everyone in the world follows it and registers every command name, etc. We may be 5 people in the world to use /command. I haven't registered my new command names for years. I'm not even sure DJB himself still bothers with it. So let's not be delusional: /command offers nothing over /bin. At this point, I'm just using it as a convenient directory to link all my slashpackage-installed binaries without cluttering /bin, but convenient is all it is. There's no real benefit of /command over FHS directories, unlike /package. There may be people who want /package but not /command; that's why I didn't auto-add /command to the default-path.
Secondly, I thought it odd that you set the default path in the backing library and not the interface programs.
Because the default path is hardcoded at compile-time in the pathexec_run routine, used by the interface programs. It's a library option because it affects everything. The thing is, the default path should basically never be used. Everyone has a PATH in their environment; PATH is definitely the place to put /command in. When there is no PATH, I'd rather use absolute pathnames until I have a PATH again than rely on a default that isn't /usr/bin:/bin. If you want a different behaviour, well, use the option :)
If it helps, I run s6 in daemontools mode (as opposed to as an init replacement) and the script that starts s6 from my inittab flushes s6's environment so I'm guaranteed to end up with the compiled-in path. Like I said, nothing that couldn't be worked around but there's a good chance that it'll surprise someone else running s6 on Debian.
Thanks for the heads-up. Maybe I should document the effects of --enable-slashpackage more explicitly, including mentioning what it does not change. -- Laurent
