Description of problem: yum --security list-updates crashes Version-Release number of selected component (if applicable): yum-utils-1.1.17-1.fc9.noarch yum-security-1.1.17-1.fc9.noarch yum-3.2.20-3.fc9.2.noarch How reproducible: always Steps to Reproduce: # yum --security list-updates Actual results: 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 339, in doCommands self._getTs(needTsRemove) File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 101, in _getTs self._getTsInfo(remove_only) File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 112, in _getTsInfo pkgSack = self.pkgSack File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 592, in <lambda> pkgSack = property(fget=lambda self: self._getSacks(), File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 447, 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 488, in exclude_hook md_info = ysp_gen_metadata(conduit.getRepos().listEnabled()) File "/usr/lib/yum-plugins/security.py", line 76, in ysp_gen_metadata md_info.add(repo) File "/usr/lib/python2.5/site-packages/yum/update_md.py", line 369, in add un = UpdateNotice(elem) File "/usr/lib/python2.5/site-packages/yum/update_md.py", line 70, in __init__ self._parse(elem) File "/usr/lib/python2.5/site-packages/yum/update_md.py", line 147, in _parse raise UpdateNoticeException("No id element found") yum.update_md.UpdateNoticeException: No id element found Expected results: pictures of happy bunnies, frolicking amongst balloons in the sunshine
I have this bug reported against yumex too. https://bugzilla.redhat.com/show_bug.cgi?id=471731
File "/usr/lib/python2.5/site-packages/yum/update_md.py", line 70, in __init__ self._parse(elem) File "/usr/lib/python2.5/site-packages/yum/update_md.py", line 147, in _parse raise UpdateNoticeException("No id element found") yum.update_md.UpdateNoticeException: No id element found ...this isn't anything to do with yum-security ... the yum parser is failing. And this is the code: if child.tag == 'id': if not child.text: raise UpdateNoticeException("No id element found") ...so I'm tempted to say it's a rel-eng problem on whatever repo. is generating updates with an empty id.
This was caused by a race condition in the push process. kernel-2.6.27.5-37.fc9 was obsoleted mid-push, after it was tagged with dist-f9-updates, but before it was able to assign an update ID. Therefore, this update was injected into the updateinfo with an empty id tag. I have since fixed the update, and fresh repositories are mashing as we speak. I filed a ticket against bodhi to fix this race condition: https://fedorahosted.org/bodhi/ticket/265
(In reply to comment #2) > ...this isn't anything to do with yum-security ... the yum parser is failing. > And this is the code: > [...] > ...so I'm tempted to say it's a rel-eng problem on whatever repo. is generating > updates with an empty id. IMO it is unacceptable for the software to fail this way merely because of some network data problem. Let it skip the troubling xml and emit a warning, with a well-placed try: / except:.
I disagree ... failing silently (by skipping the repodata) is a bad idea suddently yum --security will silently not update security errata (because the data is bad so it skips everything). I guess we could catch it at the top level of yum, so there is no backtrace, but I also wouldn't classify this as a normal failure condition.
The fixed repos should have hit our mirrors a couple of days ago.
all in all it is fixed. As we make adjustments to the security pluging and update_md in general we'll make it better.