Bug 245445 - yum info fails for things from rpmdb in yum 3.2.1
yum info fails for things from rpmdb in yum 3.2.1
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
7
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Fedora Extras Quality Assurance
:
: 248078 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-23 06:40 EDT by Mamoru TASAKA
Modified: 2014-01-21 17:58 EST (History)
2 users (show)

See Also:
Fixed In Version: 3.2.2-1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-15 15:48:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mamoru TASAKA 2007-06-23 06:40:39 EDT
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 11:07:15 EDT
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 11:59:42 EDT
(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 05:11:32 EDT
"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 11:37:13 EDT
Fixed in upstream CVS.  
Comment 5 Jeremy Katz 2007-07-15 20:13:49 EDT
*** Bug 248078 has been marked as a duplicate of this bug. ***
Comment 6 Fedora Update System 2007-07-23 11:46:38 EDT
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 12:43:35 EDT
I already use yum-3.2.2-1.fc8 and this seems to be fixed.
Comment 8 Fedora Update System 2007-08-15 15:47:48 EDT
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.