Bug 221730 - not using UTF-8 causes a yum error while reading repositories
Summary: not using UTF-8 causes a yum error while reading repositories
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kyum
Version: rawhide
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jochen Schmitt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE7Target
TreeView+ depends on / blocked
 
Reported: 2007-01-06 23:41 UTC by G.Wolfe Woodbury
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: 0.7.5-7.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-07-02 16:11:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
traceback from yum in kyum context (854 bytes, text/plain)
2007-01-06 23:41 UTC, G.Wolfe Woodbury
no flags Details
KYum snapshoot (120.59 KB, image/png)
2007-05-07 17:04 UTC, Jochen Schmitt
no flags Details

Description G.Wolfe Woodbury 2007-01-06 23:41:54 UTC
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):
kyum-0.7.5-4.fc6

How reproducible:
always

Steps to Reproduce:
1.run kyum
2.
3.
  
Actual results:
yum traceback and incomplete updates list


Expected results:
comple list of updates in kyum window


Additional info:

Comment 1 G.Wolfe Woodbury 2007-01-06 23:41:54 UTC
Created attachment 144990 [details]
traceback from yum in kyum context

Comment 2 G.Wolfe Woodbury 2007-01-12 09:38:39 UTC
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
problem fully.

Comment 3 Rex Dieter 2007-03-21 12:09:06 UTC
Jochen, ping, you there?

Comment 4 Jochen Schmitt 2007-03-21 15:58:20 UTC
Yes, I living, but i'm wondering, why you work in an non-utf-8 environment.

Comment 5 G.Wolfe Woodbury 2007-03-22 11:35:47 UTC
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
package descriptions.

In any case, the package needs a rebuild for FC7 so that it is in sychronization
with the other FC7 packages.

Comment 6 dex 2007-05-03 23:25:10 UTC
This Package has been bust write thru f7-devel time and needs urgent tlc for a
release, Is the owner Interested anymore???

Comment 7 dex 2007-05-06 06:30:20 UTC
workaround:
turn off Descriptions it then works as expected!

Comment 8 Jochen Schmitt 2007-05-07 17:04:18 UTC
Created attachment 154281 [details]
KYum snapshoot

KYum displays a package with a copyright sign in the description.

Comment 9 Jochen Schmitt 2007-05-07 17:07:15 UTC
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.

Comment 10 dex 2007-05-07 17:49:50 UTC
Can you build & try this in rawhide or any f7-test or kde-livecd ...


Comment 11 dex 2007-05-17 17:31:10 UTC
workaround:2 
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')
         print ""

kyum now works in f7.

Comment 12 Jochen Schmitt 2007-06-21 19:18:57 UTC
Hello,

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.

Best Regards:

Jochen Schmitt

Comment 13 dex 2007-06-22 03:23:05 UTC
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.

...dex 

Comment 14 Jochen Schmitt 2007-06-24 19:03:20 UTC
I will create a package with a requirement of yum >= 3.2.1.

Best Regards:

Jochen Schmitt

Comment 15 Jochen Schmitt 2007-06-24 20:29:18 UTC
Reopen it, because the bug will be need for the update process.

Comment 16 Fedora Update System 2007-06-25 23:20:19 UTC
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.

Comment 17 Jochen Schmitt 2007-07-02 15:49:23 UTC
Because kyum-0.7.5-7.fc7 was pushed on the update repository, I will close this bug.

Comment 18 Fedora Update System 2007-07-02 16:11:28 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.