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

Ville Skyttä ville.skytta at iki.fi
Wed Dec 16 22:49:15 UTC 2009


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')?

> +            prob2ui = {'requires' : _('missing requires'),
> +                       'conflicts' : _('installed conflict')}
> +            for (pkg, prob, ver, opkgs) in  self.rpmdb.check_dependencies():
[...]


More information about the Yum-devel mailing list