← Back to team overview

kicad-developers team mailing list archive

Environment variables (was Re: Config file relocation)

 

On 09/02/2014 06:59 PM, Wayne Stambaugh wrote:
On 8/31/2014 4:31 AM, Lorenzo Marcantonio wrote:
<snip>
By the way, I always wondered... why using env vars instead of settings
in a config file? IIRC there were really angry people at the prospect of
having to set environment variables (which is, by the way, the usual way
of doing that on posix systems...)

Especially since Debian policy explicitly forbids to have applications
relying on them; I don't agree with that and they even patch in defaults
which is a Bad Thing(tm) for me:P


I need to take a look at this.  An order of precedence has already been
established: environment variable, user configuration, default.  It just
needs to be coded.  I am not willing to give up being able to trump
everything with an environment variable for development purposes.

This was actually the next thing on my list of things I was planning on looking into. In fact I had these two links ready to put in my argument for putting the path variables into config files:
http://peterlyons.com/problog/2010/02/environment-variables-considered-harmful
http://www.insectnation.org/howto/environment-variables-considered-harmful

The order of precedence you mention is exactly what I had in mind. My thought also was to add to the GUI the ability to define path variables, and save them in "kicad_common" config file. If you would like me to continue to look into this let me know, or let me know if you would just rather do it yourself.

Thanks,
Moses


Follow ups

References