[Yum-devel] Re: config changes
Menno Smits
menno-yum at freshfoo.com
Tue Jun 6 08:20:00 UTC 2006
Jeremy Katz wrote:
> On Sun, 2006-06-04 at 20:50 +0100, Menno Smits wrote:
>> This has just been committed along with a bunch of other related changes
>> from me. I changed the option name from "pluginconf" to "pluginconfpath"
>> to make the purpose a little clearer.
>
> Hrmm.. the split between doStartupConfig and doConfigSetup is a little
> bit less than clear to me as an API consumer. What is trying to be
> allowed to be done between the two calls?
Yeah I don't really like the name or the way that part of the API looks
now.
The goal of this change was to allow plugins to modify the YumConf and
RepoConf classes before the configuration files are parsed. However, in
order to load plugins we need access to a few of the options in the
configuration file (eg. "plugins", "pluginpath", "pluginconfpath" ...).
There are also other options that are needed early on such as
"debuglevel" and "errorlevel". doStartupConfig() parses the early config
options and doConfigSetup() does the rest. In between the two calls,
logging is set up and plugins are (optionally) loaded.
I'm happy with how plugins can modify yum's configuration options now.
It's clean, powerful and the change allowed me to tidy up a bunch of
other stuff.
That said, I'm open to suggestions on how to tidy up yum configuration
setup API. It's a chicken and egg situation: plugins need to modify the
available config options but (some of) the config options are required
to load the plugins.
I've attached an updated version of the protectbase plugin to illustrate
how plugins can now modify yum's config options. Plugins can now even
define their own Option subclasses for customised parsing of funky options.
Menno
Scanned by the NetBox from NetBox Blue
(http://netboxblue.com/)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: protectbase.py
Type: text/x-python
Size: 1415 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20060606/4de9dee4/attachment.py
More information about the Yum-devel
mailing list