[Yum-devel] config.py

seth vidal skvidal at phy.duke.edu
Sat Jun 18 13:36:33 UTC 2005


Menno had mentioned to me a while back about not liking a lot of things
about the code in yum/config.py. I'm not sure I entirely agree with him
but there are some things in there I was thinking about making changes
to and I was wondering if anyone had any suggestions on better ways to
go:

1. getConfigOption()/setConfigOption() - these are essentially
getter/setters except for every option and allow a default to passed in
for getConfigOption(). They're kinda ugly. They're long-named and have
to be used all over the place. I looked at replacing these with python
properties to make redefining other config option based on the setting
of one option easier - however, I never found a nice way of use
properties with a large set of variables. As it is you would need at
least 3 lines per config option in config.py and that would, umm, make
that very large. Any suggestions?

2. I'd like to make it easier for when a program changes a base config
option of some kind that the change is immediately replicated throughout
all the other options, including those in the repo config data.

Thoughts?
-sv





More information about the Yum-devel mailing list