Bug 628883
Summary: | hdr.dsFromHeader() fails with "SystemError" for gpg-pubkeys | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Karel Srot <ksrot> |
Component: | rpm | Assignee: | Panu Matilainen <pmatilai> |
Status: | CLOSED ERRATA | QA Contact: | Karel Srot <ksrot> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 5.5 | CC: | mvadkert |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
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 06:45:56 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 593621 | ||
Bug Blocks: | 700492, 769266 |
Comment 2
RHEL Program Management
2011-05-31 14:53:21 UTC
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 |