Bug 687887

Summary: Command "yum repolist" generates Traceback when system is not registered to RHN.
Product: Red Hat Satellite 5 Reporter: Dimitar Yordanov <dyordano>
Component: ClientAssignee: Michael Mráka <mmraka>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: cperry, jpazdziora, nbronson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-15 15:49:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 462714    

Description Dimitar Yordanov 2011-03-15 16:28:31 UTC
Description of problem:
Command "yum repolist"  generates Traceback when system is not registered to RHN.

Version-Release number of selected component (if applicable):
REHL6.1
yum-3.2.29-7.el6.noarch
yum-rhn-plugin-0.9.1-19.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1.rm -f /etc/sysconfig/rhn/systemid
2.yum repolist
  
Actual results:
Loaded plugins: product-id, refresh-packagekit, rhnplugin, subscription-manager
Updating Red Hat repositories.
INFO:rhsm-app.repolib:repos updated: 0
This system may not be a registered to RHN. SystemId could not be acquired.
RHN Satellite or RHN Classic support will be disabled.
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 267, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 120, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 432, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 1025, in doCommand
    if nm_len < utf8_width(rname):
  File "/usr/lib/python2.6/site-packages/yum/i18n.py", line 218, in utf8_width
    for (ucs, bytes) in __utf8_iter_ucs(msg):
  File "/usr/lib/python2.6/site-packages/yum/i18n.py", line 174, in __utf8_iter_ucs
    for byte0 in uiter:
  File "/usr/lib/python2.6/site-packages/yum/i18n.py", line 170, in __utf8_iter_ints
    for byte in to_utf8(msg):
TypeError: 'NoneType' object is not iterable
[root@dell-per300-01 BKup]# rpm -q yum 
yum-3.2.29-7.el6.noarch


Expected results:
No traceback

Additional info:

Comment 1 Jan Pazdziora 2012-03-15 15:16:51 UTC
I'm not able to reproduce on RHEL 6.1 with

yum-3.2.29-21.el6.noarch
yum-rhn-plugin-0.9.1-26.el6_1.1.noarch

Can you upgrade your yum and retest? If you still get the traceback, can you remove yum-rhn-plugin and retest, to see if it's a bug in yum or yum-rhn-plugin?

Comment 2 Dimitar Yordanov 2012-03-15 15:42:50 UTC
Hi Jan, 

 I am not able to reproduce it as well.

 # mv /etc/sysconfig/rhn/systemid{,.SAVE}
 # yum repolist
 Loaded plugins: rhnplugin
 This system is not registered with RHN.
 RHN Satellite or RHN Classic support will be disabled.
 repolist: 0
 # rpm -q yum
 yum-3.2.29-22.el6_2.2.noarch


Dimi

Comment 3 Jan Pazdziora 2012-03-15 15:49:21 UTC
Great, let's CURRENTRELEASE it.