Bug 1072121

Summary: [abrt] yum: yumcommands.py:4619:_fs_filters:NameError: global name 'rpm' is not defined
Product: [Fedora] Fedora Reporter: al morris <allinux4>
Component: yumAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: admiller, autarch, fidelleon, packaging-team-maint, sgraf, vlkovo, vmukhame, Wilhelm.Buchmueller, zman0900
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/fe0ef6dda0b7c9861aeef61f2225edde2f27d46b
Whiteboard: abrt_hash:36289029b8f1f0fbde4fae3b9ca76a9588a0ff29
Fixed In Version: yum-3.4.3-148.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-10 02:57:33 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
File: environ none

Description al morris 2014-03-04 00:48:47 UTC
Version-Release number of selected component:
yum-3.4.3-137.fc20

Additional info:
reporter:       libreport-2.1.12
cmdline:        /usr/bin/python /bin/yum shell
dso_list:       python-libs-2.7.5-11.fc20.x86_64
executable:     /bin/yum
kernel:         3.13.5-200.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
yumcommands.py:4619:_fs_filters:NameError: global name 'rpm' is not defined

Traceback (most recent call last):
  File "/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 355, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 174, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 572, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 1996, in doCommand
    return base.doShell()
  File "/usr/share/yum-cli/cli.py", line 472, in doShell
    yumshell.cmdloop()
  File "/usr/share/yum-cli/shell.py", line 94, in cmdloop
    cret = cmd.Cmd.cmdloop(self, *args, **kwargs)
  File "/usr/lib64/python2.7/cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "/usr/lib64/python2.7/cmd.py", line 220, in onecmd
    return self.default(line)
  File "/usr/share/yum-cli/shell.py", line 153, in default
    self.base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 572, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 4860, in doCommand
    ret = self._fs_filters(base, extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 4619, in _fs_filters
    oil = "rpm: " + rpm.expandMacro("%_install_langs")
NameError: global name 'rpm' is not defined

Local variables in innermost frame:
self: <yumcommands.FSCommand instance at 0xf32c68>
oil: None
extcmds: []
base: <cli.YumBaseCli object at 0xf18990>
writeRawConfigFile: <function _writeRawConfigFile at 0x7f32032a35f0>

Comment 1 al morris 2014-03-04 00:48:51 UTC
Created attachment 870196 [details]
File: backtrace

Comment 2 al morris 2014-03-04 00:48:52 UTC
Created attachment 870197 [details]
File: environ

Comment 3 Fidel Leon 2014-03-16 17:21:42 UTC
Another user experienced a similar problem:

I tried to execute 'yum fs'

reporter:       libreport-2.2.0
cmdline:        /usr/bin/python /bin/yum fs
executable:     /bin/yum
kernel:         3.13.6-200.fc20.x86_64
package:        yum-3.4.3-137.fc20
reason:         yumcommands.py:4619:_fs_filters:NameError: global name 'rpm' is not defined
runlevel:       N 5
type:           Python
uid:            0

Comment 4 Fidel Leon 2014-03-17 15:17:34 UTC
As far as I know from my limited Python knowledge, there's a missing:

import rpm

in /usr/share/yum-cli/yumcommands.py

I added it by hand and error is gone.

Comment 5 Valentina Mukhamedzhanova 2014-03-17 15:33:52 UTC
That's right, and this has already been fixed upstream - http://yum.baseurl.org/gitweb?p=yum.git;a=commitdiff;h=fcec4d88fa18c30e1aeabf724bec11dcfb1e2655

Comment 6 Fedora Update System 2014-05-22 13:10:51 UTC
yum-3.4.3-148.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/yum-3.4.3-148.fc20

Comment 7 Fedora Update System 2014-05-23 18:55:22 UTC
Package yum-3.4.3-148.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing yum-3.4.3-148.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-6603/yum-3.4.3-148.fc20
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2014-06-10 02:57:33 UTC
yum-3.4.3-148.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2014-07-09 15:23:08 UTC
yum-3.4.3-152.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/yum-3.4.3-152.fc19