Help RPM database content direct reading and decoding
Andrei Nikonov
nikonovandrey1994 at gmail.com
Tue Nov 29 05:05:02 UTC 2022
Dear maintainers,
I am writing to you asking for help or advice.
I have to get a list of installed packages from /var/lib/rpm/Packages
database file directly, without using such commands as 'rpm -qa' or 'yum
list' or something else, because I might have no access to those commands
and rpm at all. Actually, my case is to get the list of installed packages
from the docker container with rpm-based OS, while the host OS can be
different.
I am using Python and all I have reached for the moment is an opened
Berkeley DB file with output of tuples of binary data. But I have no idea
how to decode this binary output to get human readable information.
Maybe I am using the wrong approach from the beginning - please refer me
the right way. Maybe there is a python library that I could use?
Unfortunately I did not find any similar questions, so decided to write
here.
Thank you in advance.
--
With regards,
Andrey Nikonov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20221129/5a58a867/attachment.html>
More information about the Rpm-list
mailing list