The gnucash binary now removed from CVS - (and config issues)

Rob Browning rlb@defaultvalue.org
Wed, 21 Nov 2001 13:02:31 -0600


(After writing the first part, I think I may have figured out a
 solution, which I've included at the end.  I'm probably going to go
 ahead and implement it for now, and we can back off people point out
 things I overlooked.)

Derek Atkins <warlord@MIT.EDU> writes:

> Please do not assume that users' PATHs are set the same as the
> builder's PATH.  The builder's PATH should take precedence unless the
> USER goes out of their way to change the default.  It should behave
> just like -rpath, except for binaries.

Well, it seems like modifying the PATH is probably a bad idea since,
as I mentioned, if guile's in /usr/bin, then you've just moved
/usr/bin to the front of the user's PATH, and that could be quite bad
on many systems where /usr/local/bin or something else has been
carefully chosen to override /usr/bin.

But if you don't add the guile bin dir to the front of PATH, then if
we ever do an "exec guile ..." from within gnucash, we may get the
wrong one.  Perhaps the answer is, "then don't do that".  Perhaps
we'll need to be careful to use @GUILE@ wherever we launch guile.

I had wanted gnucash-env to be general-purpose, but it looks like
that's not feasible, or perhaps it alone isn't enough.  I'd wanted you
to be able to say

  gnucash-env cmd arg1 arg2 ...

but this won't work where guile's considered (either if used directly
as "cmd", or as a sub command of cmd).

Actually, wait a minute.  I wonder if this is TOO EVIL(TM).  What if,
at install time we installed ${GNC_SHAREDIR}/override-script/guile
which just did this:

  #!/bin/sh
  exec @-GUILE-@ "$@"

and then gnucash-env put ${GNC_SHAREDIR}/script/guile at the head of
the PATH.  This seems to fix nearly all the problems I can think of.

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD