mhonarc-dev

Re: changes to mharc's apply-config, config.sh.dist

2002-09-24 11:48:55
On September 24, 2002 at 10:44, Eugene Eric Kim wrote:

I found a minor bug in apply-config.  If you move directories containing 
*.in files out of the $SW_ROOT directory (e.g. $SW_ROOT/html becomes 
/some/other/dir/html), apply-config will not copy changes to those *.in 
files.

You can always invoke apply-config manually on any pathname.  For
example:

  ./bin/apply-config cgi-bin

I was aware of the the potential problem if certain directories
were relocated from $SW_ROOT, but I never addressed the problem.
Something like your patch was on my unwritten TODO list :-)

+# Pathname to library directory.
+LIB_DIR=$SW_ROOT/lib

I am not sure about this one.  I have considered it, but I believe it
is generally useless because of the way config.sh is loaded.  There has
to be a ../lib directory relative to the location of mharc scripts.
This cannot be changed since how can the scripts load config.sh without
knowing where it initial shold be (unless all scripts take a config.sh
option -- I have been considering something somewhat similiar since I
plan to eventually replace the Makefile with a master control script).

A LIB_DIR variable can be handy for help defining other variables
(like your patch shows), but there is nothing intrinsic about it that
any of the scripts would take advantage of, with the possible exception
of apply-config if someone ever plans to put all other lib files in
a different location than ../lib -- the same applies to ../etc.  It
probably does not hurt to have them to make things complete and may
have unforseen benefits in the future.

It is worth noting that there is nothing wrong about defining additional
variables in config.sh as aids in defining other variables.

Having something like LIB_DIR does not solve the complete problem.
Since MHA_RC could be set to any pathname, it could be in any location
on the file system.  So either, apply-config has to be smarter on
how dealing with what is processed by default, or users will just
have to be careful about moving things around too much.

BTW, the SW_ROOT variable can be problematic.  It should never really
be set to anything other than where you installed the mharc files.
In the next release, the new install.pl script will automatically set
this for new installations (along with a couple of other variables).

Thinking of install.pl, if an existing config.sh does change the
locations of various directories, doing an upgrade will not work as
expected since an existing config.sh is not checked for when copying
distribution files over to SW_ROOT.  Ugh.  This just made implementing
install.pl more complicated if upgrades are to be handled smartly.

--ewh

---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV

<Prev in Thread] Current Thread [Next in Thread>