[Rpm-maint] [rpm-software-management/rpm] Add real-life examples of Python RPM (PR #3177)
Jakub Kadlčík
notifications at github.com
Fri Jun 21 10:06:34 UTC 2024
@FrostyX commented on this pull request.
> +import rpm
+
+ts = rpm.TransactionSet()
+mi = ts.dbMatch("name", "hello")
+hdr = next(mi, None)
+if hdr:
+ print(
+ f"Name : {hdr[rpm.RPMTAG_NAME]}\n"
+ f"Version : {hdr[rpm.RPMTAG_VERSION]}\n"
+ f"Release : {hdr[rpm.RPMTAG_RELEASE]}\n"
+ f"Architecture: {hdr[rpm.RPMTAG_ARCH]}\n"
+ f"Install Date: {hdr[rpm.RPMTAG_INSTALLTIME]}\n"
+ f"Group : {hdr[rpm.RPMTAG_GROUP]}\n"
+ f"Size : {hdr[rpm.RPMTAG_SIZE]}\n"
+ f"License : {hdr[rpm.RPMTAG_LICENSE]}\n"
+ f"Signature : TODO\n"
What is the correct tag here, please?
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3177#pullrequestreview-2132307187
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3177/review/2132307187 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240621/67aca09b/attachment.html>
More information about the Rpm-maint
mailing list