[Yum-devel] [PATCH] Convert all errors to strings, for history to log them. BZ 526294

Seth Vidal skvidal at fedoraproject.org
Tue Sep 29 20:55:38 UTC 2009



On Tue, 29 Sep 2009, James Antill wrote:

> Main problem here is crap comes out of rpm. We really want just [0] for
> disk space errors ... but alas. other stuff isn't like that.
> We could try and inspect the data, and guess what error it is, but just
> dumping it all out works fine atm.
> ---
> yum/__init__.py |    5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/yum/__init__.py b/yum/__init__.py
> index e645e22..6e06005 100644
> --- a/yum/__init__.py
> +++ b/yum/__init__.py
> @@ -65,7 +65,7 @@ warnings.simplefilter("ignore", Errors.YumFutureDeprecationWarning)
> from packages import parsePackages, YumAvailablePackage, YumLocalPackage, YumInstalledPackage, comparePoEVR
> from constants import *
> from rpmtrans import RPMTransaction,SimpleCliCallBack
> -from i18n import to_unicode
> +from i18n import to_unicode, to_str
>
> import string
>
> @@ -1078,7 +1078,8 @@ class YumBase(depsolve.Depsolve):
>             resultobject.return_code = 1
>         else:
>             if self.conf.history_record:
> -                self.history.end(rpmdbv, 2, errors=errors)
> +                herrors = [to_unicode(to_str(x)) for x in errors]
> +                self.history.end(rpmdbv, 2, errors=herrors)
>             raise Errors.YumBaseError, errors
>
>         if not self.conf.keepcache:


ACk as long as I can continue to hate the rpm errors...
-sv



More information about the Yum-devel mailing list