Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionPradeep 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
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)>
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 ">".
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
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