[Yum-devel] 3.2

Jeremy Katz katzj at redhat.com
Thu May 17 03:24:21 UTC 2007


On Wed, 2007-05-16 at 20:53 -0400, James Bowes wrote:
> On Wed, 16 May 2007 16:11:37 -0400, Jeremy Katz wrote:
> > On Wed, 2007-05-16 at 16:07 -0400, Jeremy Katz wrote:
> > > On Wed, 2007-05-16 at 15:58 -0400, Jeremy Katz wrote:
> > > > In some (light at this point) testing, everything seems to work but if I
> > > > didn't break anything, I'll be shocked.  Thoughts, comments, other
> > > > ideas?
> 
> I hate this bug.

+1 ;-)

> > Index: output.py
[snip]
> Don't need this, eh?

Yeah, just was fed up enough to not even edit the diff ;)

> > Index: yum/__init__.py
> > ===================================================================
> > RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
> > retrieving revision 1.326
> > diff -u -u -r1.326 __init__.py
> > --- yum/__init__.py	14 May 2007 18:39:58 -0000	1.326
> > +++ yum/__init__.py	16 May 2007 20:11:13 -0000
> > @@ -71,7 +71,7 @@
> >          self._pkgSack = None
> >          self.logger = logging.getLogger("yum.YumBase")
> >          self.verbose_logger = logging.getLogger("yum.verbose.YumBase")
> > -        self._repos = None
> > +        self._repos = RepoStorage(self)
> >  
> >          # Start with plugins disabled
> >          self.disablePlugins()
> 
> Could switch this back to self.repos now.

I can't see a good reason not to either.  

> > Index: yum/repos.py
> > ===================================================================
> > RCS file: /home/groups/yum/cvs/yum/yum/repos.py,v
> > retrieving revision 1.105
> > diff -u -u -r1.105 repos.py
> > --- yum/repos.py	25 Apr 2007 18:28:31 -0000	1.105
> > +++ yum/repos.py	16 May 2007 20:11:13 -0000
> > @@ -27,13 +27,39 @@
> >      """This class contains multiple repositories and core configuration data
> >         about them."""
> >         
> > -    def __init__(self):
> > +    def __init__(self, ayum):
> 
> This breaks api, right? That's what bugs me, as we already know what the bug breaks, but not what the fix might break.

We _could_ make it so that ayum can be None and that doSetup can take an
ayum arg -- then, it wouldn't have to break API as old API users would
be guaranteed to be calling YumBase.doRepoSetup() which can do the right
thing; new callers would pass in the YumBase object to the constructor
and then it would be fine accessing later.  But aiyee.

Doing a google search, the only outside caller of the RepoStorage
constructor is in yumex and Tim already made a change there...  I think
if we did the second option above, yumex could go back to the code it
was using for yum 3.0 and not work.  

Jeremy




More information about the Yum-devel mailing list