Bug 1005282 - yum.update_md.UpdateNotice.xml() omits the RPM epochs
yum.update_md.UpdateNotice.xml() omits the RPM epochs
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum (Show other bugs)
6.4
x86_64 Linux
unspecified Severity high
: rc
: ---
Assigned To: packaging-team-maint
Karel Srot
:
Depends On: 1020540
Blocks: 980611 1005288
  Show dependency treegraph
 
Reported: 2013-09-06 11:12 EDT by Randy Barlow
Modified: 2014-10-14 00:36 EDT (History)
4 users (show)

See Also:
Fixed In Version: yum-3.2.29-50.el6
Doc Type: Bug Fix
Doc Text:
NO DOCS NEEDED
Story Points: ---
Clone Of:
: 1005288 (view as bug list)
Environment:
Last Closed: 2014-10-14 00:36:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1410 normal SHIPPED_LIVE yum bug fix update 2014-10-13 20:54:51 EDT

  None (edit)
Description Randy Barlow 2013-09-06 11:12:12 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">
        <filename>%s</filename>
      </package>\n""" % (to_xml(pkg['arch'], attrib=True),
                                to_xml(pkg['name'], attrib=True),
                                to_xml(pkg['epoch'], attrib=True),
                                to_xml(pkg['release'], attrib=True),
                                to_xml(pkg['src'], attrib=True),
                                to_xml(pkg['version'], attrib=True),
                                to_xml(pkg['filename']))

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.
Comment 1 Randy Barlow 2013-09-06 11:13:37 EDT
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
yum-3.2.29-40.el6.noarch
Comment 3 James Antill 2013-10-15 14:02:14 EDT
 This was fixed upstream, adding ACKs for el6:

commit bd351efeac0e5d81af900150defcb8e2a9e0497c
Author: James Antill <james@and.org>
Date:   Fri Sep 6 09:34:05 2013 -0400

    Add epoch to updateinfo xml output.
Comment 4 Randy Barlow 2013-10-17 17:41:14 EDT
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.

https://bugzilla.redhat.com/show_bug.cgi?id=1020540

I'll mark this bug as depending on that one.

Thanks so much for your help!
Comment 9 errata-xmlrpc 2014-10-14 00:36:38 EDT
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.

http://rhn.redhat.com/errata/RHBA-2014-1410.html

Note You need to log in before you can comment on or make changes to this bug.