[Yum-devel] [PATCH] Fix check_dups() to use provides as installonly does, Eg. kernel-PAE-devel

Seth Vidal skvidal at fedoraproject.org
Fri Jan 15 16:37:43 UTC 2010



On Fri, 15 Jan 2010, James Antill wrote:

> ---
> yum/rpmsack.py |   17 +++++++++++------
> 1 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/yum/rpmsack.py b/yum/rpmsack.py
> index 2ffc820..6840a57 100644
> --- a/yum/rpmsack.py
> +++ b/yum/rpmsack.py
> @@ -1123,22 +1123,27 @@ class RPMDBPackageSack(PackageSackBase):
>                 problems.append(prob)
>         return problems
>
>
> -    def check_duplicates(self, ignore=[]):
> -        """ Checks for any missing dependencies. """
> -
> +    def check_duplicates(self, ignore_provides=[]):
> +        """ Checks for any "duplicate packages" (those with multiple versions
> +            installed), we ignore any packages with a provide in the passed
> +            provide list (this is how installonlyworks, so we do the same). """
> +        ignore_provides = set(ignore_provides)
>         problems = []
> -        for last, pkg in self._iter_two_pkgs(ignore):
> +        for last, pkg in self._iter_two_pkgs(ignore_provides):
>             if pkg.name != last.name:
>                 continue
>             if pkg.verEQ(last) and pkg != last:

Isn't this an api-break by changing the kwarg?

-sv





More information about the Yum-devel mailing list