[Yum-devel] [PATCH 2/4] Give a message about weird rpmdb release provides problems.

seth vidal skvidal at fedoraproject.org
Thu Jul 14 17:17:04 UTC 2011


On Thu, 2011-07-14 at 11:45 -0400, James Antill wrote:
> ---
>  yum/config.py |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/yum/config.py b/yum/config.py
> index cb7ed57..dca13fa 100644
> --- a/yum/config.py
> +++ b/yum/config.py
> @@ -1028,7 +1028,10 @@ def _getsysver(installroot, distroverpkg):
>      if idx.count() == 0:
>          releasever = '$releasever'
>      else:
> -        hdr = idx.next()
> +        try:
> +            hdr = idx.next()
> +        except StopIteration:
> +            raise Errors.YumBaseError("Error: rpmdb failed release provides. Try: rpm --rebuilddb")
>          releasever = hdr['version']
>          del hdr
>      del idx


ACK

-sv




More information about the Yum-devel mailing list