Bug 245445 - yum info fails for things from rpmdb in yum 3.2.1
Summary: yum info fails for things from rpmdb in yum 3.2.1
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 7
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 248078 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-23 10:40 UTC by Mamoru TASAKA
Modified: 2014-01-21 22:58 UTC (History)
2 users (show)

Fixed In Version: 3.2.2-1.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-08-15 19:48:16 UTC


Attachments (Terms of Use)

Description Mamoru TASAKA 2007-06-23 10:40:39 UTC
Description of problem:
[root@localhost ~]# yum info coreutils
Loading "installonlyn" plugin
Installed Packages
Name   : coreutils
Arch   : i386
Version: 6.9
Release: 2.fc7
Size   : 8.0 M
Repo   : installed
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 94, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 266, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd,
self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 164, in doCommand
    base.listPkgs(ypl.installed, 'Installed Packages', basecmd)
  File "/usr/share/yum-cli/output.py", line 102, in listPkgs
    self.infoOutput(pkg)
  File "/usr/share/yum-cli/output.py", line 72, in infoOutput
    print _("Summary: %s") % pkg.summary.encode("UTF-8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 4: ordinal
not in range(128)

Version-Release number of selected component (if applicable):
[root@localhost ~]# rpm -q yum
yum-3.2.1-1.fc7

How reproducible:
100%

Expected results:
[root@localhost ~]# yum info coreutils
Loading "installonlyn" plugin
Installed Packages
Name   : coreutils
Arch   : i386
Version: 6.9
Release: 2.fc7
Size   : 8.0 M
Repo   : installed
Summary: GNU コアユーティリティー: よくシェルスクリプトで使われるツールのセット

Description:
These are the GNU core utilities.  This package is the combination of
the old GNU fileutils, sh-utils, and textutils packages.

[root@localhost ~]# rpm -q yum
yum-3.2.0-1.fc7

Comment 1 Jeremy Katz 2007-06-25 15:07:15 UTC
You have specspo installed, correct?  And are checking for an installed package?

I suspect if you pipe through more or cat or the like, it'll fail with 3.2.0. 
I'm not sure how we can handle both cases here :-/

Comment 2 Mamoru TASAKA 2007-06-25 15:59:42 UTC
(In reply to comment #1)
> You have specspo installed, correct? 
Yes (specspo is specspo-14-1.fc7)
 
> And are checking for an installed package?
This case, yes. After your comment, I also tried
for a package not yet installed:
---------------------------------------------------
[root@localhost /]# yum info a2ps
Loading "installonlyn" plugin
Available Packages
Name   : a2ps
Arch   : i386
Version: 4.13b
Release: 65.fc7
Size   : 1.1 M
Repo   : fedora
Summary: Converts text and other types of files to PostScript(TM)
Description:
The a2ps filter converts text and other types of files to PostScript(TM).
A2ps has pretty-printing capabilities and includes support for a wide
number of programming languages, encodings (ISO Latins, Cyrillic, etc.),
and medias.
-----------------------------------------------------
For this case, Summary is shown in English. After I installed
a2ps, summary is shown in Japanese (UTF-8).

> I suspect if you pipe through more or cat or the like, 
> it'll fail with 3.2.0. 
Well. I just tried # yum info coreutils | less or
# yum info coreutils > ~/yum.log , however they does NOT fail.


Comment 3 Per Steinar Iversen 2007-06-28 09:11:32 UTC
"yum info" fails on my machine too, it uses the US English locale:

# yum info > /dev/null
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 94, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 264, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd,
self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 165
, in doCommand
    base.listPkgs(ypl.available, 'Available Packages', basecmd)
  File "/usr/share/yum-cli/output.py", line 102, in listPkgs
    self.infoOutput(pkg)
  File "/usr/share/yum-cli/output.py", line 73, in infoOutput
    print _("Description:\n%s") % pkg.description
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb4' in position
109: ordinal not in range(128)


Comment 4 Jeremy Katz 2007-06-28 15:37:13 UTC
Fixed in upstream CVS.  

Comment 5 Jeremy Katz 2007-07-16 00:13:49 UTC
*** Bug 248078 has been marked as a duplicate of this bug. ***

Comment 6 Fedora Update System 2007-07-23 15:46:38 UTC
yum-3.2.2-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Mamoru TASAKA 2007-07-23 16:43:35 UTC
I already use yum-3.2.2-1.fc8 and this seems to be fixed.

Comment 8 Fedora Update System 2007-08-15 19:47:48 UTC
yum-3.2.2-1.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.