Bug 462372 - yum-security plug-in not working with --bz options
Summary: yum-security plug-in not working with --bz options
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-utils
Version: 9
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-15 18:07 UTC by Lance Albertson
Modified: 2008-10-09 21:36 UTC (History)
3 users (show)

Fixed In Version: yum-utils-1.1.17-1.fc9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-09-22 15:27:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Lance Albertson 2008-09-15 18:07:06 UTC
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 19:25:17 UTC
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 07:41:21 UTC
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 07:41:28 UTC
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 21:28:01 UTC
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 21:36:11 UTC
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.