Gentoo Archives: gentoo-dev

From: "Guillermo A. Amaral" <me@×××××××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] /{"",usr/}bin path changed. What is the right solution for scripts?
Date: Sun, 01 Apr 2007 07:02:45
Message-Id: 200704010757.58976.me@guillermoamaral.com
In Reply to: [gentoo-dev] /{"",usr/}bin path changed. What is the right solution for scripts? by Peter Volkov
1 On Sunday 01 April 2007, Peter Volkov wrote:
2 > Hello.
3 >
4 > Path of some utilities in coreutils-6.7-r1 changed from /usr/bin to /bin
5 > and vice versa. This cause some scripts became broken as they relied on
6 > the full path to executable. The question is: does there exist best
7 > practice on how to avoid this problem in future? Should we set some
8 > default PATH in scripts or should we call "command -p program"? Or as
9 > this is mainly problem for scripts that work in cron we should suggest
10 > users to set PATH in crontab? Or may be we should fix coreutils to
11 > create all possible symlinks?
12 >
13 > TIA,
14
15 IMHO I have always like the PATH in script approach, it seems like a
16 reasonable solution to me.
17
18 --
19 Guillermo A. Amaral, CSE
20 # Free & Open Source Advocate
21 & nick: guillermoamaral
22 @ blog: http://blog.guillermoamaral.com/
23 @ site: http://www.guillermoamaral.com/
24 $ irc: guillermoamaral@freenode
25 % gpg: http://downloads.guillermoamaral.com/public.asc