[Yum-devel] YumBase.preconf ... to get rid of doConfigSetup etc.

seth vidal skvidal at fedoraproject.org
Fri Oct 24 19:13:42 UTC 2008


On Fri, 2008-10-24 at 15:06 -0400, James Antill wrote:
> Here's a patch Seth and I talked about for how we can easily get rid of
> doConfigSetup() etc. when we break the API, without having to do lots of
> code changes all over the place at the same time.
> 
>  The basic idea is that if you want to run yum without plugins, instead
> of calling:
> 
> yb.doConfigSetup(init_plugins=False)
> 
> ...you'd just do:
> 
> yb.preconf.init_plugins = False
> 
> ...and then when the yb.conf object is created it'll take the data from
> there. It's backwards compatible with the external API, so we can
> convert callers and then just rm the methods when we have an API break.


Would it make more sense to allow ANY config attribute to be set rather
than specifying them? I know it would be tricky to ensure but it would
mean not having to constantly add them in later when they are wanted for
some arbitrary setup.

I'm doing something like that in createrepo b/t the optparser and the
metadataconfig class. So if there is a setting in the opt parser object
then it gets pushed into the metadata config class of the same attribute
name.

otherwise - as we talked about before - I think this is a reasonably
good idea.
-sv




More information about the Yum-devel mailing list