Red Hat Bugzilla – Bug 466093
'yum repolist' does not show all enabled repos
Last modified: 2014-01-21 18:06:13 EST
Created attachment 319739 [details]
decode the utf-8 string returned by locale.format
Description of problem:
'yum repolist' does not show that I have the standard 'rawhide' repo enabled. It's completely missing in 'yum repolist all' output too.
The problem is locale-dependent. I use cs_CZ.UTF-8. 'LANG=C yum repolist' works fine.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Make sure you have enabled a repo with at least 1000 packages (e.g. Rawhide).
2. LANG=cs_CZ.UTF-8 yum repolist all
Notice that the repo is not listed. A traceback can be seen with -d6 or more:
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
File "/usr/share/yum-cli/yummain.py", line 229, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 104, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 339, in doCommands
return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
File "/usr/share/yum-cli/yumcommands.py", line 716, in doCommand
base.fmtKeyValFill(_("Repo-pkgs : "), ui_num),
File "/usr/share/yum-cli/output.py", line 308, in fmtKeyValFill
File "/usr/lib64/python2.5/textwrap.py", line 315, in fill
File "/usr/lib64/python2.5/textwrap.py", line 287, in fill
File "/usr/lib64/python2.5/textwrap.py", line 278, in wrap
File "/usr/lib64/python2.5/textwrap.py", line 258, in _wrap_chunks
lines.append(indent + ''.join(cur_line))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 2: ordinal not in range(128)
yum should list all repos.
I found the bug. 'yum repolist' wants to print the count of packages in the repo. In the Czech locale the thousands separator is a no-break space character. This character is not in ASCII.
I propose the following patch.
I didn't see the patch, but I've pushed a fix upstream which fixes it for me:
...it'll get into Fedora 10.