-
Bug
-
Resolution: Not a Bug
-
Minor
-
None
-
rhel-9.2.0
-
None
-
None
-
Moderate
-
rhel-swm
-
ssg_core_services
-
None
-
False
-
False
-
-
None
-
Red Hat Enterprise Linux
-
None
-
None
-
None
-
None
What were you trying to do that didn't work?
sqlite3 /var/lib/rpm/rpmdb.sqlite 'pragma integrity_check;'
This command deletes the "rpmdb.sqlite-shm" and "rpmdb.sqlite-wal" files
Please provide the package NVR for which bug is seen:
rpm-4.16.1.3-22.el9.x86_64
How reproducible:
Everytime
Steps to reproduce
[root@r9 rpm]# pwd
/var/lib/rpm
[root@r9 rpm]# ls
rpmdb.sqlite rpmdb.sqlite-shm rpmdb.sqlite-wal
[root@r9 rpm]# sqlite3 /var/lib/rpm/rpmdb.sqlite 'pragma integrity_check;'
ok
[root@r9 rpm]# ls
rpmdb.sqlite
[root@r9 rpm]# su - user
Last login: Mon Oct 23 15:26:56 EDT 2023 on pts/0
[user@r9 ~]$ rpm -qa
error: sqlite failure: CREATE TABLE IF NOT EXISTS 'Packages' (hnum INTEGER PRIMARY KEY AUTOINCREMENT,blob BLOB NOT NULL): attempt to write a readonly database
error: cannot open Packages index using sqlite - No such file or directory (2)
error: cannot open Packages database in /var/lib/rpm
Expected Results
These files should not be deleted or they should be recreated immediately. Without them non-privileged users can not read the database
Actual Results
The files are removed until a privileged user runs an rpm command which regenerates them.