Smart config file parsing

Michael Jennings mej at kainx.org
Thu Jun 12 13:40:04 PDT 2008


On Thursday, 12 June 2008, at 10:12:39 (-0700),
Grant McWilliams wrote:

> So this wouldn't help in getting us closer to this
> 
> mirrorlist=
> http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
> 
> or is it just not the best way of doing it? I'm sure variables could be
> accomodated for without ConfigParser.

You don't need variables.  Think about it:  when was the last time you
needed to alter those values ($releasever and $basearch) on an
existing system?

The only real reason to use variables there is so that the config file
itself can pass between systems, which is really a case of
poor/improper management and/or lazy packaging.

Those "variables" should be set by the package at build/install time
and left alone.

Michael

-- 
Michael Jennings (a.k.a. KainX)  http://www.kainx.org/  <mej at kainx.org>
Linux Server/Cluster Admin, LBL.gov       Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
 "That's the thing about faith:  If you don't have it, you can't
  understand, and if you do, no explanation is necessary."
                    -- Major Kira Nerys, "Star Trek:  Deep Space Nine"



More information about the Smart mailing list