Red Hat Bugzilla – Bug 1005282
yum.update_md.UpdateNotice.xml() omits the RPM epochs
Last modified: 2014-10-14 00:36:38 EDT
In yum.update_md, there is a class called UpdateNotice. This class seems to be used to represent an Errata, and the Pulp project uses the xml() method in this class to generate the updateinfo.xml files when we publish Yum repositories.
We are experiencing a problem in #980611 where the generated XML does not include epochs in the RPMs that are referenced by the errata. I believe it is due to a simple omission of the epoch in lines 365-372 in update_md.py.
I think something like this would probably resolve our issue:
msg += """ <package arch="%s" name="%s" epoch="%s" release="%s" src="%s" version="%s">
</package>\n""" % (to_xml(pkg['arch'], attrib=True),
It may be worthwhile to consider something like ElementTree for generating this XML, though for the sake of consistency and ease, simply adding epoch to the existing code would probably be the desireable solution.
Thanks, and let me know if you have any questions.
I forgot to mention the version of Yum that I am using (which would probably help identify the line numbers I referenced better…)
$ rpm -q yum
This was fixed upstream, adding ACKs for el6:
Author: James Antill <email@example.com>
Date: Fri Sep 6 09:34:05 2013 -0400
Add epoch to updateinfo xml output.
There seems to be an encoding bug in the fix for this issue that I've filed a Fedora 19 report about. We might want to hold off on backporting this fix to RHEL6 until #1020540 is also fixed, if you don't mind.
I'll mark this bug as depending on that one.
Thanks so much for your help!
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.