How can I find details on the binary representation of the RPM DB? #2211
-
I am trying to find an RPM version agnostic way to find details on installed software on any Linux distro that uses RPM packages. A co-worker found for one version of RPM that the magic byte array/slice Is there any documentation for the binary representation of the RPM DB for each RPM version I could look at? If there is no documentation for this, where can I find the relevant part of the source code for the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 11 replies
-
That's the wrong end to be looking at, totally. 'rpm -q' with --queryformat gives you access to every single bit of data in the rpmdb. The other option is the librpm API, whether through C or Python bindings. The API for database access is largely unchanged in the last 14-15 years. |
Beta Was this translation helpful? Give feedback.
-
The details of the database format are OFF-LIMITS TO EXTERNAL USERS! Sqlite is but one of the possible database formats. If you want to access the rpm database, you do so through the librpm API. |
Beta Was this translation helpful? Give feedback.
-
Nothing wrong with curiosity, and this being open source, obviously nobody can prevent people from looking. The rpmdb format is undocumented because it is a private implementation detail which rpm is free to change at will. |
Beta Was this translation helpful? Give feedback.
That's the wrong end to be looking at, totally.
'rpm -q' with --queryformat gives you access to every single bit of data in the rpmdb.
The other option is the librpm API, whether through C or Python bindings. The API for database access is largely unchanged in the last 14-15 years.