Rpm 4.2 API (was: Re: New beginnings)
Jos Vos <[email protected]> Wed, 29 Jan 2003 21:21:21 +0100
| Newsgroups | gmane.network.up2date.current.devel |
|---|---|
| Message-ID | <[email protected]> |
> I'm not aware of any documentation for the new API.
FWIW, I made small test program on RHL 8.1 beta with its rpm 4.2 API:
ts = rpm.TransactionSet("/", rpm._RPMVSF_NOSIGNATURES)
fd = os.open(pathname, os.O_RDONLY)
hdr = ts.hdrFromFdno(fd)
os.close(fd)
name = hdr[rpm.RPMTAG_NAME]
...
This works fine. The boolean "isSource" that previously was returned
by rpm.headrFromPackage can now be obtained by accessing
hdr[rpm.RPMTAG_SOURCEPACKAGE].
--
-- Jos Vos <[email protected]>
-- X/OS Experts in Open Systems BV | Phone: +31 20 6938364
-- Amsterdam, The Netherlands | Fax: +31 20 6948204