[Yum-devel] Behavior on repo del

Jeremy Katz katzj at redhat.com
Fri Sep 7 15:44:41 UTC 2007


On Fri, 2007-09-07 at 11:39 -0400, seth vidal wrote:
> On Fri, 2007-09-07 at 11:33 -0400, Jeremy Katz wrote:
> > When we switched around how the repos worked in the YumBase object, the
> > handling of delete wasn't adjusted accordingly.  We should definitely be
> > resetting to a clean RepoStorage() object rather than setting to None.
> > But then should we also set it back up with the repos from the config?
> > 
> > Patch doing so attached, could also be convinced that callers need to
> > explicitly reset repos from config if they want it.  Other opinions?
> > 
> 
> shouldn't be setting them back up that way - b/c we won't always be
> using the config repos. an example - a caller of yum which sets up the
> repos, does whatever, shuts everything back down and then wants to run
> again using the same yum base object  with repos it made on its own.

The thing that's at least a little weird is that you don't want to
delete the repos without deleting the config.  Because when you
initially get the repos, we make sure the config is setup (which ends up
calling getReposFromConfig).  But since your config object will still
exist, that won't implicitly happen after deleting the repos.

That said, I'm entirely okay with having del self._repos;
self.getReposFromConfig().  So I'll go ahead and commit that in a few

Jeremy




More information about the Yum-devel mailing list