discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Totally Gormless


From: Richard Frith-Macdonald
Subject: Re: Totally Gormless
Date: Wed, 12 Oct 2005 07:21:51 +0000

On 2005-10-11 21:57:07 +0000 Adam Fedor <fedor@doc.com> wrote:

On 2005-10-11 13:59:50 -0600 Nicola Pero <nicola.pero@operatelecom.com> wrote:
The reason we have user_home.c is that the code to determine the user home
wasn't exactly simple, and couldn't be done properly with a single unix command ...

... if that's the case now -- and if it can be done simply and
consistently on all platforms that way -- then why not. ;-)

PS: My original idea was to simply include GNUstep.conf in shell scripts. I hope the idea has been kept in the sense that the GNUstep.conf syntax is
compatible with sh syntax.  If so, and if we can just include GNUstep.conf
in shell scripts (and makefiles!) instead of running C tools, that would
be as fast and simple as you can get it. :-)


Actually, the problem now is that GNUstep.conf is located in a platform-dependant place, which is determined in the configuration of gnustep-base (typically it's in /etc/GNUstep/GNUstep.conf). So user_home might have a hard time finding it. At one point I had a really good reason for having the configuration in base, but I'm not so sure I remember now. gnustep-base certainly needs to know it though. The other alternative is to put user_home in gnustep-base - that makes the synchronization of path finding between user_home and gnustep-base easier. user_home isn't really needed anymore, except by developers, anyway. Still gnustep-make would be somehow incomplete...

I think that the location of GNUstep.conf should be configured in gnustep-make rather than gnustep-base. At the moment, user_home.c can't parse GNUstep.conf ... because the make package doesn't know where the file is.

So, if the configure.ac code used to specify the files location in base was moved to make (and obviously we set up a machanism to pass it from make to base), we would be in a much better position, as user_home could then use the configured info to read GNUstep.conf

I'm not sure about removing user_home.c ... it might be more complex to handle it in shell scripts than in a C program... we have two files to parse ... the system-wide config file and the per-user file. We need to parse the system-wide file to determine the location of the per-user file (which we could do by sourcing it), but we can't just source the per-user file, unless we want to accept it overriding values from the system-wide file. If we *do* want to allow the per-user file to override the system-wide file, we would have to implement that in NSPathUtilities too. I guess we could use sed to extract the required values from the second file ... depends whether we want this process to be as fast as possible, or are willing to tolerate runnign a coule of sed child processes ... I'm not really bothered by the overhead.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]