Bug 550647

Summary: yum-aliases plugin dies when given empty args: yum ""
Product: [Fedora] Fedora Reporter: ashwin <ashwin.hambarde>
Component: yum-utilsAssignee: Seth Vidal <skvidal>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: ffesti, james.antill, maxamillion, pmatilai, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard: abrt_hash:3d6a8e5b
Fixed In Version: 1.1.25-1.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-04 17:09:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace none

Description ashwin 2009-12-26 16:34:34 UTC
abrt 1.0.0 detected a crash.

backtrace
-----
Summary: TB3d6a8e5b aliases.py:77:resolve_aliases:IndexError: string index out of range

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 315, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 180, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 351, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 720, in doCommand
    return base.doShell()
  File "/usr/share/yum-cli/cli.py", line 290, in doShell
    yumshell.cmdloop()
  File "/usr/lib/python2.6/cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "/usr/lib/python2.6/cmd.py", line 213, in onecmd
    return self.default(line)
  File "/usr/share/yum-cli/shell.py", line 90, in default
    self.base.plugins.run('args', args=xargs)
  File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 177, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/aliases.py", line 166, in args_hook
    resolve_aliases(args=conduit.getArgs(), log=conduit.info)
  File "/usr/lib/yum-plugins/aliases.py", line 77, in resolve_aliases
    if arg[0] != '-':
IndexError: string index out of range

Local variables in innermost frame:
log: <bound method ArgsPluginConduit.info of <yum.plugins.ArgsPluginConduit instance at 0xa89f8ec>>
skip: 0
args: ['']
need_rep: False
num: 0
arg: 

cmdline: /usr/bin/python /usr/bin/yum shell 
component: yum
executable: /usr/bin/yum
kernel: 2.6.31.6-166.fc12.i686.PAE
package: yum-3.2.25-1.fc12
uuid: 3d6a8e5b

Comment 1 ashwin 2009-12-26 16:34:38 UTC
Created attachment 380440 [details]
File: backtrace

Comment 2 James Antill 2009-12-26 21:20:22 UTC
Cute:

args: ['']

...that was unexpected. Fixed upstream.

Comment 3 Fedora Update System 2010-01-27 12:13:15 UTC
yum-utils-1.1.25-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/yum-utils-1.1.25-1.fc12

Comment 4 Fedora Update System 2010-02-11 14:47:43 UTC
yum-utils-1.1.25-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.