RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1005282 - yum.update_md.UpdateNotice.xml() omits the RPM epochs
Summary: yum.update_md.UpdateNotice.xml() omits the RPM epochs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.4
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: Karel Srot
URL:
Whiteboard:
Depends On: 1020540
Blocks: 980611 1005288
TreeView+ depends on / blocked
 
Reported: 2013-09-06 15:12 UTC by Randy Barlow
Modified: 2014-10-14 04:36 UTC (History)
4 users (show)

Fixed In Version: yum-3.2.29-50.el6
Doc Type: Bug Fix
Doc Text:
NO DOCS NEEDED
Clone Of:
: 1005288 (view as bug list)
Environment:
Last Closed: 2014-10-14 04:36:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1410 0 normal SHIPPED_LIVE yum bug fix update 2014-10-14 00:54:51 UTC

Description Randy Barlow 2013-09-06 15:12:12 UTC
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 15:13:37 UTC
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 18:02:14 UTC
 This was fixed upstream, adding ACKs for el6:

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

    Add epoch to updateinfo xml output.

Comment 4 Randy Barlow 2013-10-17 21:41:14 UTC
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 04:36:38 UTC
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.