[Yum-devel] request: yumvar plugin hook

Michael E Brown Michael_E_Brown at dell.com
Sat Apr 7 21:57:28 UTC 2007


I would like to request a new yum plugin hook: yumvars_hook. Run
self.plugins.run('yumvars') right after 
    doConfigSetup(...):
        ...
        self.conf = config.readMainConfig(startupconf)
        self.plugins.run('yumvars')

I believe it should re-use the same conduit as the init_hook.

The reason for this is for future compatibility. Right now, I use an
init_hook, and I have to repo.yumvar.update() after I add a yumvar, as
well as manually reprocess the mirrorlist variable. If, in the future,
the mirrorlist is processed differently (as I just found out is the case
for at least yum 2.4.3, so it may be different in the future as well), I
wont have to do anything special.

I would be able to make a plugin that is compatible with a wide range of
yum versions by exiting early in the init_hook if the plugin api is new
enough.

Thanks,
Michael



More information about the Yum-devel mailing list