On Mon, Mar 19, 2007 at 05:44:42PM -0400, seth vidal wrote: > On Mon, 2007-03-19 at 09:48 -0500, Michael E Brown wrote: > > I would like to write a plugin to be able to add vars to the 'yumvars' > > hash. I > > would like to have a yum repo like this: > > > > [dell-machinespecific] > > baseurl=http://linux.dell.com/repo/machine_specific/system-$dellsystemid > > > > But the problem I see is that there is no place where the plugins get called > > between where yumvars is set (readMainConfig()) and where it is used > > (getReposFromConfig()): > > > > --> yum/__init__.py doConfigSetup(): > > ====================================== > > self.conf = config.readMainConfig(startupconf) > > self.yumvar = self.conf.yumvar > > self.getReposFromConfig() > > > > The only way I can see to do this is really ugly. Any suggestions? > > Hmm, What you want to do might not be possible right now. But your > reason for wanting to do it is interesting. It might make for a good > reason to add the ability to do this. Can you use the > environment-variable defined values in the interim? YUMVAR0-9, I mean.
Unless I grossly mistake the usage of these vars, no, I dont believe so. The problem is reliability. The user has to manually set these prior to running yum, and I dont think I can really rely on this. Plus it would have to be set for things like pup, etc. What I was thinking of was using an init_hook to go and grub through the configuration and manually replace the strings. It duplicates a lot of code, but looks do-able until an official hook exists. What do you think? -- Michael _______________________________________________ Yum-devel mailing list [email protected] https://lists.dulug.duke.edu/mailman/listinfo/yum-devel
