[Yum-devel] [PATCH] Work around bad epoch data in updateinfo
seth vidal
skvidal at fedoraproject.org
Mon Aug 16 19:06:41 UTC 2010
On Mon, 2010-08-16 at 15:04 -0400, James Antill wrote:
> ---
> yum/update_md.py | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/yum/update_md.py b/yum/update_md.py
> index 9e492ba..d4d6820 100644
> --- a/yum/update_md.py
> +++ b/yum/update_md.py
> @@ -225,6 +225,12 @@ class UpdateNotice(object):
> package = {}
> for pkgfield in ('arch', 'epoch', 'name', 'version', 'release', 'src'):
> package[pkgfield] = elem.attrib.get(pkgfield)
> + if 'epoch' in package:
> + # Bad epoch and arch data is the most common (missed) screwups.
> + # Deal with bad epoch data.
> + if not package['epoch'] or package['epoch'][0] not in '0123456789':
> + package['epoch'] = None
> +
> for child in elem:
> if child.tag == 'filename':
> package['filename'] = child.text
ACK
-sv
More information about the Yum-devel
mailing list