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 887935 - updateinfo xml generated via yum ignores the updated date
Summary: updateinfo xml generated via yum ignores the updated date
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: Karel Srot
URL:
Whiteboard:
Depends On:
Blocks: 895654
TreeView+ depends on / blocked
 
Reported: 2012-12-17 16:08 UTC by Pradeep Kilambi
Modified: 2014-01-21 06:25 UTC (History)
7 users (show)

Fixed In Version: yum-3.2.29-40.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 10:13:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0406 0 normal SHIPPED_LIVE yum bug fix and enhancement update 2013-02-20 20:50:44 UTC

Description Pradeep Kilambi 2012-12-17 16:08:42 UTC
Description of problem:

When updateinfo xml is generated via yum api's specifically update_md.UpdateNotice's xml method, it only accounts for issued date and ignored the updated date.

Version-Release number of selected component (if applicable):
yum-3.2.29-22.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. run the xml method in UpdateNotice with updated date passed in.

  
Actual results:
<updates>
<update from="security" status="final" type="bugfix" version="1">
  <id>RHBA-2012:0145</id>
  <title>python-psycopg2 bug fix and enhancement update</title>
  <release></release>
  <issued date="2012-02-17 00:00:00"/>
  <description>The python-psycopg2 package provides a PostgreSQL database adapter for the
Python programming language.
...

<updates>

Expected results:
<updates>
<update from="security" status="final" type="bugfix" version="1">
  <id>RHBA-2012:0145</id>
  <title>python-psycopg2 bug fix and enhancement update</title>
  <release></release>
  <issued date="2012-02-17 00:00:00"/>
  <description>The python-psycopg2 package provides a PostgreSQL database adapter for the
Python programming language.
...
  <updated date="2012-05-17 00:00:00"/>

<updates>

Additional info:

Patch sent upstream

---
 yum/update_md.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/yum/update_md.py b/yum/update_md.py
index e71f9ef..0f31c31 100644
--- a/yum/update_md.py
+++ b/yum/update_md.py
@@ -330,7 +330,9 @@ class UpdateNotice(object):
                 to_xml(self._md['title']), to_xml(self._md['release']),
                 to_xml(self._md['issued'], attrib=True),
                 to_xml(self._md['description']))
-
+        if self._md['updated']:
+            # include the updated date in the generated xml
+            msg += """ <updated date="%s"\n""" % (to_xml(self._md['updated'], attrib=True))
         if self._md['summary']:
             msg += """  <summary>%s</summary>\n""" % (to_xml(self._md['summary']))
         if self._md['solution']:
-- 
1.7.11.7

Comment 1 James Antill 2012-12-17 16:11:19 UTC
Simple fix, should be trivial to test.

Comment 5 Zdeněk Pavlas 2012-12-18 15:13:51 UTC
Just nitpicking, but neither the patch, nor the original code respects DTD order.  The parser does not care, but I'd at least try to keep "issued" and "updated" close.

            <!ELEMENT update (id, synopsis?, issued, updated,
                              references, description, rights?,
                              severity?, summary?, solution?, pkglist)>

Comment 6 Karel Srot 2012-12-19 07:54:56 UTC
Just a note to a proposed patch:

+msg += """ <updated date="%s"\n""" % (to_xml(self._md['updated'], attrib=True))

element in the code above is not closed, it is missing ">".

Comment 13 errata-xmlrpc 2013-02-21 10:13:15 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-2013-0406.html


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