[Yum-devel] Configuration handling for Yum
Menno Smits
menno-yum at freshfoo.com
Thu Sep 29 06:19:29 UTC 2005
Hi all,
Find attached the basis for a configuration system for Yum. This follows
on from Seth's work on this. It needs a bit more work but I'm fairly
happy with it.
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)
- any variety of parsing functions can be used to convert config file
strings to useful Python values.
- variable subsitution as per the current Yum variables (eg. $arch)
A usage example is below the "Parsing functions" comment with the
implementation above that. I used a custom Python descriptor to do the
magic.
I need to write more parsing functions for handling URL lists etc.
Hopefully this is clear enough that people get the idea.
Comments, questions and suggestions welcome.
Menno
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum-config.py
Type: text/x-python
Size: 5070 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20050929/f8c0e58b/attachment.py
More information about the Yum-devel
mailing list