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

Rob Browning rlb@defaultvalue.org
Wed, 21 Nov 2001 12:22:34 -0600


I've rearranged things a bit and finally done away with the gnucash
binary.

Let me know if there are any problems.

There is also a new script, which may or may not stay around,
depending on what Dave and I decide, called gnucash-env.  You can use
this to run arbitrary commands with suitable gnucash environment
settings.  It is already being used by the main gnucash script, and
you invoke it like this:

  gnucash-env some-cmd arg1 arg2

so if you just wanted to run a guile script that uses the gnucash
infrastructure, you might do this:

  gnucash-env guile -s some-script arg1 arg2

One thing that's not clear to me ATM is what the semantics wrt to
choosing the right "guile" should be.  If you just say "guile" as
above, should you get the one that was found at configure-time, or
should you get whichever one is currently in your path?

This is another one of those somewhat ugly configuration questions:
should the user have the flexibility at run-time to modify which tools
they're using via the traditional PATH (and sometimes LD_LIBRARY_PATH)
mechanisms, or should we force usage of the tools that were determined
at configure-time?

It looks like gnucash-run-script may address this question by using a
GNC_GUILE environment variable for overrides.  I'm not sure what the
best approach is.

I can see situations where any of the above approaches could be
problematic.  I'm wondering if a well-documented and suitably flexible
gnucash-env command might be the answer -- i.e. with command-line
switches to give you different behaviors i.e.:

  gnucash-env --use-guile-in-path ...
  gnucash-env --configured-guile ...

but even here you're going to run in to trouble -- how do you choose
the configured guile?  If you just invoke it explicitly with a full
path, then you'll get the one you want, but any sub-execlp's from your
script will get the wrong one.

Alternately, if you just augment the PATH to make sure you get the
right one, how do you do that?  Do you put the dir at the end of the
PATH as a default, or do you put it at the front so you're sure it's
used.  If the latter, then what if the guile that was found at
configure time was /usr/bin/guile, and so now you're adding /usr/bin
to the front of the PATH, and probably screwing up anyone who has
important tools in /usr/local/bin that should shadow /usr/bin...

-- 
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