[Yum-devel] Configuration handling for Yum

Paul Nasrat pnasrat at redhat.com
Tue Oct 4 15:51:03 UTC 2005


On Thu, 2005-09-29 at 16:19 +1000, Menno Smits wrote:
> Hi all,

Hey Menno,

I was/am working on a slightly different approach - but I think that
they can be combined.  For things like repoconfig, firstboot, etc I need
also to be able to write out repo configs into includes/repo.d.

I'm writing subclasses of ConfigParser to allow this - it's not complete
but here is where I'm upto right now.  It doesn't do things like the
type checking, etc.  I'm pretty confident the linked options can be
handled through ConfigParser too - ala the populate/parent mechanism you
use.

> Main features are:
>    - clear, non-redundant, consise definition of config options
>    - option inheritance of defaults and setup between options
>    - options are easily accessed (just like normal attributes)

Sounds good so far...

>    - any variety of parsing functions can be used to convert config file

The above is really what I've been looking at

>      strings to useful Python values.
>    - variable subsitution as per the current Yum variables (eg. $arch) 

This could be just a custom interpolation - cf % interpolation in
ConfigParser

> 
> Comments, questions and suggestions welcome.

I've had a quick look, and it looks good - certainly, perhaps we can
figure how to join up what we have...

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.py
Type: text/x-python
Size: 3687 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20051004/5b8528cc/attachment.py 


More information about the Yum-devel mailing list