On Thu, 2011-09-29 at 00:17 -0400, seth vidal wrote:
> On Wed, 2011-09-28 at 16:56 -0400, James Antill wrote:
> > ---
> >  yum/depsolve.py |   13 +++++++++++++
> >  1 files changed, 13 insertions(+), 0 deletions(-)
> > 
> > diff --git a/yum/depsolve.py b/yum/depsolve.py
> > index 8fe4952..699a23c 100644
> > --- a/yum/depsolve.py
> > +++ b/yum/depsolve.py
> > @@ -816,6 +816,19 @@ class Depsolve(object):
> >                      if checkdep:
> >                          break # The next conflict might be the same pkg
> >  
> > +                # check Obsoletes
> > +                #  Atm. This is _just_ checking for transaction members 
> > which
> > +                # obsolete each other. Because rpm will now auto. obs. 
> > those
> > +                # anyway. We _don't_ check for installed pkgs. which might 
> > obs.
> > +                # something to be installed, even though rpm will also do 
> > that.
> > +                for txmbr in self.tsInfo.getMembersWithState(None, 
> > output_states=TS_INSTALL_STATES):
> > +                    for obs_n in txmbr.po.obsoletes_names:
> > +                        for otxmbr in self.tsInfo.matchNaevr(name=obs_n):
> > +                            if otxmbr.output_state not in 
> > TS_INSTALL_STATES:
> > +                                continue
> > +                            if otxmbr.po.obsoletedBy([txmbr.po]):
> > +                                self.tsInfo.remove(otxmbr.pkgtup)
> > +
> >                  if CheckDeps:
> >                      if self.dsCallback: self.dsCallback.restartLoop()
> >                      self.verbose_logger.log(logginglevels.DEBUG_1, 
> > _('Restarting Loop'))
> 
> 
> this makes me hurt all over. I'm sure it'll be fine but an installed pkg
> obsoleting something which is TO be installed sounds like we're doing
> something wrong.

 This patch doesn't do that, although my understanding is that rpm does
that so we need to as well (basically turn all installed obsoletes into
conflicts).
 This just says that if you install "foo" and "bar" and "foo" obsoletes
"bar", then even if obsoletes are off "bar" isn't going to be installed
so we should remove it from the transaction.

_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to