[Yum-devel] [PATCH] Don't accidentally exit 1, when someone asks to update a non-existant pkg
Seth Vidal
skvidal at fedoraproject.org
Fri Aug 28 14:52:20 UTC 2009
On Fri, 28 Aug 2009, James Antill wrote:
> This got introduced in ef6f313d5f97aa7398ac3aa04c4637d8b9da7125 from
> April, 2009. It's not indended behaviour.
> ---
> yum/__init__.py | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/yum/__init__.py b/yum/__init__.py
> index 3f75528..faa4895 100644
> --- a/yum/__init__.py
> +++ b/yum/__init__.py
> @@ -2944,7 +2944,11 @@ class YumBase(depsolve.Depsolve):
> # Always look for available packages, it doesn't seem to do any
> # harm (apart from some time). And it fixes weird edge cases where
> # "update a" (which requires a new b) is different from "update b"
> - m =self.pkgSack.returnNewestByNameArch(patterns=[kwargs['pattern']])
> + try:
> + pats = [kwargs['pattern']]
> + m = self.pkgSack.returnNewestByNameArch(patterns=pats)
> + except Errors.PackageSackError:
> + m = []
> availpkgs.extend(m)
>
> if not availpkgs and not instpkgs:
> --
> 1.6.2.5
Ack - I hate pseudo-failures.
-sv
More information about the Yum-devel
mailing list