Gentoo Archives: gentoo-dev

From: Alec Warner <antarus@g.o>
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:05:43
Message-Id: 59092.67.180.39.52.1175410873.squirrel@webmail.scriptkitty.com
In Reply to: [gentoo-dev] /{"",usr/}bin path changed. What is the right solution for scripts? by Peter Volkov
1 > Hello.
2 >
3 > Path of some utilities in coreutils-6.7-r1 changed from /usr/bin to /bin
4 > and vice versa. This cause some scripts became broken as they relied on
5 > the full path to executable. The question is: does there exist best
6 > practice on how to avoid this problem in future? Should we set some
7 > default PATH in scripts or should we call "command -p program"? Or as
8 > this is mainly problem for scripts that work in cron we should suggest
9 > users to set PATH in crontab? Or may be we should fix coreutils to
10 > create all possible symlinks?
11 >
12 > TIA,
13 > --
14 > Peter.
15 >
16
17 One idea that comes to mind is /usr/bin/env $bin
18
19 For cron, one would need to set the PATH to something sane though.
20
21 --
22 gentoo-dev@g.o mailing list

Replies