remove ugly hacks from mergerepos now that fixes to yum have been checked in upstream
This commit is contained in:
parent
a75ddac324
commit
279418adf1
1 changed files with 0 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue