Bug 462372 - yum-security plug-in not working with --bz options
yum-security plug-in not working with --bz options
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
9
All Linux
medium Severity high
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-15 14:07 EDT by Lance Albertson
Modified: 2008-10-09 17:36 EDT (History)
3 users (show)

See Also:
Fixed In Version: yum-utils-1.1.17-1.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-22 11:27:44 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 Lance Albertson 2008-09-15 14:07:06 EDT
Description of problem:

Running 'yum --bz 449738 check-update' (or something similar) produces a python error. The actual intention was to run 'yum --bz 449738 update' but check-update is a sane test for the same thing. Seems as though the latest yum-security update introduces this bug.

Version-Release number of selected component (if applicable):

yum-3.2.19-3.fc9.noarch
yum-metadata-parser-1.1.2-8.fc9.x86_64
yum-security-1.1.16-1.fc9.noarch
yum-utils-1.1.16-1.fc9.noarch

Steps to Reproduce:
1. yum --bz 449738 check-update
2.
3.
  
Actual results:

[root@sgnode01 ~]# yum --bz 449738 check-update
Loaded plugins: security
Limiting package lists to security relevant ones
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 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 335, in doCommands
    self._getTs()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 99, in _getTs
    self._getTsInfo()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 105, in _getTsInfo
    self._tsInfo.setDatabases(self.rpmdb, self.pkgSack)
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 591, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 446, in _getSacks
    self.plugins.run('exclude')
  File "/usr/lib/python2.5/site-packages/yum/plugins.py", line 176, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/security.py", line 514, in exclude_hook
    not ysp_should_keep_pkg(opts, name2tup[name], md_info, used_map)):
  File "/usr/lib/yum-plugins/security.py", line 430, in ysp_should_keep_pkg
    if ysp_should_filter_pkg(opts, name, notice, used_map):
  File "/usr/lib/yum-plugins/security.py", line 117, in ysp_should_filter_pkg
    elif opts.bz and _has_id(notice['references'], "bugzilla", opts.bz):
  File "/usr/lib/yum-plugins/security.py", line 101, in _has_id
    used_map[ref_type][ref['id']] = True
NameError: global name 'used_map' is not defined


Expected results:

Should return what packages it wants to update with error.

Additional info:

I did some digging around and it seems as though commit efb71d1f might have introduced the bug, but I'm not entirely sure either. I also tried using the latest version of security.py from git and got the same results (sanes different line numbers of course). Let me know if you want me to try anything or give more feedback.

Thanks!
Comment 1 Lance Albertson 2008-09-15 15:25:17 EDT
Seth caught me on IRC and told me that it was indeed a miss on their part and was just fixed in git (624826ed). I tried that patched version and got the expected results:

[root@sgnode01 ~]# yum --bz 449738 check-update
Loaded plugins: security
Limiting package lists to security relevant ones
Needed 1 of 68 packages, for security

util-linux-ng.x86_64                     2.13.1-8.3.fc9         updates-newkey  

Thanks for the quick turn around, I appreciate it!
Comment 2 Fedora Update System 2008-09-18 03:41:21 EDT
yum-utils-1.1.17-1.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/yum-utils-1.1.17-1.fc8
Comment 3 Fedora Update System 2008-09-18 03:41:28 EDT
yum-utils-1.1.17-1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/yum-utils-1.1.17-1.fc9
Comment 4 Fedora Update System 2008-10-09 17:28:01 EDT
yum-utils-1.1.17-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 5 Fedora Update System 2008-10-09 17:36:11 EDT
yum-utils-1.1.17-1.fc8 has been pushed to the Fedora 8 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.