[Yum-devel] [PATCH 2/4] Speedup distro-sync, only get the latest pkgs for those we are interested in

Tim Lauridsen tim.lauridsen at googlemail.com
Wed Apr 21 16:08:29 UTC 2010


On Mon, Apr 19, 2010 at 10:00 PM, James Antill <james at and.org> wrote:

> ---
>  cli.py |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/cli.py b/cli.py
> index 1678e65..4d5b538 100644
> --- a/cli.py
> +++ b/cli.py
> @@ -721,7 +721,14 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
>             del ipkgs[installed[0]]
>
>         apkgs = {}
> -        for pkg in self.pkgSack.returnNewestByName():
> +        pkgs = []
> +        if ipkgs:
> +            try:
> +                pkgs =
> self.pkgSack.returnNewestByName(patterns=ipkgs.keys())
> +            except Errors.PackageSackError:
> +                pkgs = []
> +
> +        for pkg in pkgs:
>             if pkg.name not in ipkgs:
>                 continue
>             apkgs[pkg.name] = pkg
> --
> 1.6.6.1
>
> _______________________________________________
> Yum-devel mailing list
> Yum-devel at lists.baseurl.org
> http://lists.baseurl.org/mailman/listinfo/yum-devel
>

ACK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.baseurl.org/pipermail/yum-devel/attachments/20100421/457eb988/attachment.htm>


More information about the Yum-devel mailing list