[Yum-devel] [PATCH 2/2] Create a _rpmdb_warn_checks function, and use that when we find an rpmdb version warning.

James Antill james at fedoraproject.org
Thu Dec 17 05:41:54 UTC 2009


On Thu, 2009-12-17 at 00:49 +0200, Ville Skyttä wrote:
> On Friday 11 December 2009, James Antill wrote:
> 
> > diff --git a/yum/__init__.py b/yum/__init__.py
> > index c2ac471..9fa700d 100644
> > --- a/yum/__init__.py
> > +++ b/yum/__init__.py
> > @@ -1062,6 +1062,31 @@ class YumBase(depsolve.Depsolve):
> >              toRemove.add(dep)
> >              self._getDepsToRemove(dep, deptree, toRemove)
> > 
> > +    def _rpmdb_warn_checks(self, out=None, warn=True, chkcmd='all'):
> > +        if out is None:
> > +            out = self.logger.warning
> > +        if warn:
> > +            out(_('Warning: RPMDB altered outside of yum.'))
> > +
> > +        rc = 0
> > +        if chkcmd in ('all', 'duplicates'):
> 
> Shouldn't this be ('all', 'dependencies')?

 Yeh, thanks.

> > +            prob2ui = {'requires' : _('missing requires'),
> > +                       'conflicts' : _('installed conflict')}
> > +            for (pkg, prob, ver, opkgs) in  self.rpmdb.check_dependencies():
> [...]
> _______________________________________________
> Yum-devel mailing list
> Yum-devel at lists.baseurl.org
> http://lists.baseurl.org/mailman/listinfo/yum-devel



More information about the Yum-devel mailing list