Bug 1820579 - RFE: Handle database conversion automatically
Summary: RFE: Handle database conversion automatically
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: 1818910
TreeView+ depends on / blocked
Reported: 2020-04-03 11:45 UTC by Panu Matilainen
Modified: 2020-05-07 06:45 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-05-07 06:45:48 UTC
Type: Bug

Attachments (Terms of Use)

Description Panu Matilainen 2020-04-03 11:45:27 UTC
Acceptance of https://fedoraproject.org/wiki/Changes/Sqlite_Rpmdb essentially required that the database is converted automatically in the process. We need to handle that somehow, this bug is to track that specific goal.

Comment 1 Panu Matilainen 2020-05-07 06:45:48 UTC
Database conversions are handled by the following scheme:

There's a new rpmdb-rebuild systemd service, which can be flagged to run on next reboot by creating '.rebuilddb' flag file in the rpm database directory, ie 'touch /var/lib/rpm/.rebuilddb'. This is not conversion or backend specific in any way, so it can be used to flag the database for maintenance rebuild (think VACUUM, regardless of the backend) at a time where there are no external users.

During updates of rpm package, if BDB rpm database is detected (/var/lib/rpm/Packages), it's flagged for rebuild on the next reboot regardless of configured backend. This serves two purposes: convert away from BDB to the configured database, or if configured to stay on BDB for now, give it a much needed maintenance rebuild (ensure index sanity, restore performance etc) from time to time.

Established in rawhide as of rpm >= 4.15.90-0.git14971.11

Note You need to log in before you can comment on or make changes to this bug.