/usr/local/bin in $PATH in system scripts?

Jim Doherty doherty0 at frontiernet.net
Wed May 9 23:03:30 UTC 2007

Fergal Daly wrote:
> Hi,
> I'm looking for clarification of policy in the context of this bug
> https://launchpad.net/ubuntu/+source/gnome-system-tools/+bug/71336
> and the fact that having your own version of Perl in /usr/local will
> almost certainly break your Ubuntu admin tools.
> I have always assumed that it was safe to put whatever I like in
> /usr/local/ and my system will continue to work. This seems to be
> backed up by Debian policy
> http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
> which contains this paragraph
> "However, because /usr/local and its contents are for exclusive use of
> the local administrator, a package must not rely on the presence or
> absence of files or directories in /usr/local for normal operation."
> This seems quite sensible, otherwise it leads to mysterious and hard
> to track-down failures.
> Is this ubuntu policy too?

Sorry, I have no idea what ubuntu policy is.   But good defensive
scripting practice includes setting your $PATH to something safe.  A
good script should always not trust the environment it was handed along
with many other things that people don't always do.


> I can't see any real benefit to including /usr/local/bin and I can
> find plenty of people in the forums who can't start *-admin,
> presumably due to problems similar to mine,
> F

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20070509/4f898815/attachment.sig>

More information about the Ubuntu-devel-discuss mailing list