- Exportdb simply dumps all the headers from rpmdb into simple header
list which is about as rpm-native and backwards and forwards compatible
format as they come. Importdb obviously, well, imports such a
list into rpmdb.
- Both require transaction handle: we dont want anybody running
transactions while exporting, and importing obviously requires
write-locking.
- The common pattern here is grabbing current flags to a local
variable, modifying them for an operation and then restoring,
which is fine... but we dont care about the previous flags
when we're restoring them.
- It got exposed in the rpmdb tool splitup, but the functionality in
it's current form is still just as dubious as it always was, hide
it out of sight again.
- rpmdb maintenance only requires privileges on the rpmdb directory,
not elsewhere on the system. Splitting to separate tool allows
finer grained SELinux policies and makes adding new db-specific
switches saner.