Bug 221730 - not using UTF-8 causes a yum error while reading repositories
not using UTF-8 causes a yum error while reading repositories
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: kyum (Show other bugs)
rawhide
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jochen Schmitt
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: FE7Target
  Show dependency treegraph
 
Reported: 2007-01-06 18:41 EST by G.Wolfe Woodbury
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 0.7.5-7.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-02 12:11:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description G.Wolfe Woodbury 2007-01-06 18:41:54 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):
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 18:41:54 EST
Created attachment 144990 [details]
traceback from yum in kyum context
Comment 2 G.Wolfe Woodbury 2007-01-12 04:38:39 EST
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 08:09:06 EDT
Jochen, ping, you there?
Comment 4 Jochen Schmitt 2007-03-21 11:58:20 EDT
Yes, I living, but i'm wondering, why you work in an non-utf-8 environment.
Comment 5 G.Wolfe Woodbury 2007-03-22 07:35:47 EDT
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 19:25:10 EDT
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 02:30:20 EDT
workaround:
turn off Descriptions it then works as expected!
Comment 8 Jochen Schmitt 2007-05-07 13:04:18 EDT
Created attachment 154281 [details]
KYum snapshoot

KYum displays a package with a copyright sign in the description.
Comment 9 Jochen Schmitt 2007-05-07 13:07:15 EDT
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 13:49:50 EDT
Can you build & try this in rawhide or any f7-test or kde-livecd ...
Comment 11 dex 2007-05-17 13:31:10 EDT
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 15:18:57 EDT
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-21 23:23:05 EDT
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 15:03:20 EDT
I will create a package with a requirement of yum >= 3.2.1.

Best Regards:

Jochen Schmitt
Comment 15 Jochen Schmitt 2007-06-24 16:29:18 EDT
Reopen it, because the bug will be need for the update process.
Comment 16 Fedora Update System 2007-06-25 19:20:19 EDT
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 11:49:23 EDT
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 12:11:28 EDT
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.