Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 628883 - hdr.dsFromHeader() fails with "SystemError" for gpg-pubkeys
hdr.dsFromHeader() fails with "SystemError" for gpg-pubkeys
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rpm (Show other bugs)
5.5
All Linux
medium Severity medium
: rc
: ---
Assigned To: Panu Matilainen
Karel Srot
:
Depends On: 593621
Blocks: 700492 769266
  Show dependency treegraph
 
Reported: 2010-08-31 05:33 EDT by Karel Srot
Modified: 2012-10-11 04:05 EDT (History)
1 user (show)

See Also:
Fixed In Version: rpm-4.4.2.3-25.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-21 01:45:56 EST
Type: ---
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-2012:0283 normal SHIPPED_LIVE rpm bug fix and enhancement update 2012-02-20 10:05:55 EST

  None (edit)
Comment 2 RHEL Product and Program Management 2011-05-31 10:53:21 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 8 Karel Srot 2011-11-23 05:03:09 EST
Hi Panu,
I can see some differences between RHEL6.2 and RHEL5.8. Why is rpm.ds class printed as empty string? 

RHEL6.2:

>>> import rpm
>>> for hdr in rpm.TransactionSet().dbMatch("name", "gpg-pubkey"):
...   hdr.dsFromHeader()
... 
<rpm.ds object at 0x7fe60a6f88f0>
<rpm.ds object at 0x7fe60a6f8878>
<rpm.ds object at 0x7fe60a6f88f0>
<rpm.ds object at 0x7fe60a6f8878>

RHEL5.8 with rpm-4.4.2.3-26.el5:

>>> import rpm
>>> for hdr in rpm.TransactionSet().dbMatch("name", "gpg-pubkey"):
...   hdr.dsFromHeader()
... 


>>> 
>>> list(rpm.TransactionSet().dbMatch("name", "gpg-pubkey"))
[<rpm.hdr object at 0xb7f0bd40>, <rpm.hdr object at 0xb7f0bda0>]
>>> a,b = _
>>> a
<rpm.hdr object at 0xb7f0bd40>
>>> a.dsFromHeader()

>>> repr(a.dsFromHeader())
'<rpm.ds object at 0xb7f37578>'
>>> a.dsFromHeader().__class__
<type 'rpm.ds'>
>>>
Comment 9 Panu Matilainen 2011-11-23 07:36:52 EST
The difference comes from rpm-4.4.x python bindings incorrectly implementing a "print" method for various types, including the "ds":
http://docs.python.org/c-api/typeobj.html#tp_print

In 4.4.x those print methods end up literally calling fprintf() on stdout when it should just represent itself as a string or such, this bogosity has been removed in newer versions. You would generally only see this difference when using the python interpreter interactively, in an actual script the print method wouldn't be invoked in a situation like this.
Comment 11 errata-xmlrpc 2012-02-21 01:45:56 EST
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-2012-0283.html

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