On 28 Oct 2004, at 1:55 PM, David Brown wrote:

On Wed, Oct 27, 2004 at 05:23:47PM -0400, Koen van der Drift wrote:

A package I am working on uses /usr/bin/test during compiling. I don't
have that on my Mac (10.3.5). Anyone have a suggestion what I should do
in this case? Is there maybe a fink package that installs /sw/bin/test?

It's in /bin/test. Any idea why the path is hardcoded into the test?

Hardcoded paths are a good thing in my opinion for a couple of reasons:

a) Security - Fink runs everything as root. It is long established practice that root scripts should use hard coded paths. I want to know that the standard /bin/test is being run, not some other script called "test" that I might have in my path.

b) Compatibility - Different versions of executables can have slightly different behaviour. For instance, I had a problem in one of my packages where the build was failing if the user had the fink version of makeinfo, whereas /usr/bin/makeinfo worked fine. By hard coding the path, I knew it would work for anyone.

c) Consistency - Fink has a policy that a binary package should be the same no matter which machine it was built on. (eg packages do not use G5 optimisations on a G5) If you don't hard code paths, the binary package could be subtly different depending on the users path.

Just my $0.02

--
Rohan Lloyd



-------------------------------------------------------
This Newsletter Sponsored by: Macrovision For reliable Linux application installations, use the industry's leading
setup authoring tool, InstallShield X. Learn more and evaluate today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to