remove ugly hacks from mergerepos now that fixes to yum have been checked in upstream

This commit is contained in:
Mike Bonnet 2009-09-18 16:32:12 -04:00
parent a75ddac324
commit 279418adf1

View file

@ -186,18 +186,6 @@ class RepoMerge(object):
seen_srpms[srpm_name] = pkg.repoid
origins.write('%s\t%s\n' % (pkg, repo.urls[0]))
# XXX hack: ensure the package attributes are utf-8-encoded
# strs so yum doesn't choke when generating the XML.
# We need to re-encode pkgId because it is used in the value of
# pkg.checksum
for attr in ('pkgId', 'name', 'arch', 'epoch', 'ver', 'rel'):
if hasattr(pkg, attr):
setattr(pkg, attr, yum.misc.to_utf8(getattr(pkg, attr)))
# Also ensure that summary and description aren't None
if getattr(pkg, 'summary', None) is None:
pkg.summary = ''
if getattr(pkg, 'description', None) is None:
pkg.description = ''
origins.close()
self.mdconf.additional_metadata['origin'] = pkgorigins