Red Hat Bugzilla – Bug 221730
not using UTF-8 causes a yum error while reading repositories
Last modified: 2007-11-30 17:11:52 EST
Description of problem:
Yum throws a traceback (attached) due to the presence of a UTF-8 character [the
trademark symbol] in the description of some packages (notably policyutils for
SELinux). This is a kyum error because using yum directly doesn't cause the
error, and kyum is limiting the character set to ascii.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
yum traceback and incomplete updates list
comple list of updates in kyum window
Created attachment 144990 [details]
traceback from yum in kyum context
I re-built kyum from the SRPM under the development environment and the error
is still present in the resulting program.
I'm not a KDE programmer, so I don't have the skills to further debug this
Jochen, ping, you there?
Yes, I living, but i'm wondering, why you work in an non-utf-8 environment.
I don't live in a non UTF-8 environment, but the KYum package built for FC6 is
apparently using some non-UTF-8 thing. The package shows the attached traceback
when run against the current repositories for development and FC6.
The traceback clearly shows that it is being triggered by an extended character
(usually the TM or Copyright symbols) that are appearing in the SELinux policy
In any case, the package needs a rebuild for FC7 so that it is in sychronization
with the other FC7 packages.
This Package has been bust write thru f7-devel time and needs urgent tlc for a
release, Is the owner Interested anymore???
turn off Descriptions it then works as expected!
Created attachment 154281 [details]
KYum displays a package with a copyright sign in the description.
I have create a simple package with contains a copyright sign and have put it
into a local repository.
KYum works with this package without any complaints on my computer, as you can
see on the attached screenshot.
Can you build & try this in rawhide or any f7-test or kde-livecd ...
Patch yum to only output utf-8
--- /usr/share/yum-cli/output.py~ 2007-05-11 17:48:24.000000000 +0100
+++ /usr/share/yum-cli/output.py 2007-05-11 17:49:20.000000000 +0100
@@ -55,20 +55,20 @@ class YumOutput:
def simpleList(self, pkg):
ver = pkg.printVer()
- na = '%s.%s' % (pkg.name, pkg.arch)
+ na = '%s.%s' % (pkg.name.encode('utf-8'), pkg.arch.encode('utf-8'))
print "%-40.40s %-22.22s %-16.16s" % (na, ver, pkg.repoid)
def infoOutput(self, pkg):
- print _("Name : %s") % pkg.name
- print _("Arch : %s") % pkg.arch
+ print _("Name : %s") % pkg.name.encode('utf-8')
+ print _("Arch : %s") % pkg.arch.encode('utf-8')
if pkg.epoch != "0":
print _("Epoch : %s") % pkg.epoch
- print _("Version: %s") % pkg.version
- print _("Release: %s") % pkg.release
+ print _("Version: %s") % pkg.version.encode('utf-8')
+ print _("Release: %s") % pkg.release.encode('utf-8')
print _("Size : %s") % self.format_number(float(pkg.size))
- print _("Repo : %s") % pkg.repoid
- print _("Summary: %s") % pkg.summary
- print _("Description:\n%s") % pkg.description
+ print _("Repo : %s") % pkg.repoid.encode('utf-8')
+ print _("Summary: %s") % pkg.summary.encode('utf-8')
+ print _("Description:\n%s") % pkg.description.encode('utf-8')
kyum now works in f7.
Thank you for your patch.
But the patched file contains the the yum package, so I will open a bug for this
component for including the patch into yum.
It seem's yum must have bit somebody else there also because it has already been
patched in yum-3.2.1-1.fc7. Hence this patch is no longer needed.
I will create a package with a requirement of yum >= 3.2.1.
Reopen it, because the bug will be need for the update process.
kyum-0.7.5-7.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report.
Because kyum-0.7.5-7.fc7 was pushed on the update repository, I will close this bug.
kyum-0.7.5-7.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.