[RFC Patch] Invert the program entry point

Derek Atkins warlord at MIT.EDU
Tue Jan 3 11:38:17 EST 2006


Quoting Chris Shoemaker <c.shoemaker at cox.net>:

>> I, too, believe it's a good idea.  I've been suggesting this route
>> as a quick-and-dirty way to get around the fragileness of /usr/bin/guile.
>> Historically we've had a problem when /usr/bin/guile executes a version
>> of guile different than the one gnucash was compiled against.
>
> Is that what motivated the libexec/overrides/* scripts?  Because I'm
> not seeing why these things would still be needed after gnucash is an
> executable.

Good question..  I honestly don't really remember exactly.  I never
thought the gnucash-as-a-script was a good idea (although I did
understand the theoretical power of doing it this way -- it just never
turned out that anyone ever cared about that power).

The override scripts were implemented in order to setup the environment
for gnucash to run.  In particular, it was used to setup the load paths
for the libraries and modules and such.

The reason they all got put into libexec/overrides/ was to make it easy
to run them:

  PATH=${libexec}/overrides:$PATH
  foo...

Would make sure we always got the overrides version of 'foo.'

>> What you've
>> done is effectively fixed that shortcoming..
>
> I can't take credit for the design.  I've *never* seen a modular
> program built like gnucash, but lots of programs do the
> script-calls-executable-which-links-to-interpreted-modules-thing.

Don't worry, I'm not trying to give you credit for it.  ;)
This exact design has been discussed several times in the past,
but personally I've not been motivated enough to do it myself.
I just set up all the necessary ~/.gdbinit glue to make it easy
for me to debug gnucash on my own..

Actually, what I usually do is "gdb attach" to the running app
after it's up...  The only time I use the gdb glue is when the crash
happens during startup.

>> Over time we can move more of the initialization into C, but this is a
>> good first start.  :)
>
> Yes, it's intentionally a very small step, but I think it will make
> that migration _very_ easy.

Small steps is a good thing.  :)

> -chris

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available



More information about the gnucash-devel mailing list