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.
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'> >>>
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.
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