From Bugzilla Helper: User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.17-14 i686) Packages file gets corrupted when trying to install any RPM while the disk is full. can't tell actuall package revisions 'cause rpm db is corrupt: latest RPM, from updates latest db3, from updates /var partition filled up while trying to install latest vim-common from updates, received error that mentions a .c file (unfortunately, haven't saved the error message). immediately after that, any rpm queries would fail: [root@sasha rpm]# rpm -qa error: cannot open Packages index using db3 - Invalid argument (22) [root@sasha rpm]# rpm --rebuilddb error: cannot open Packages index [root@sasha rpm]# db_verify Packages db_verify: Page 1197: Invalid next_pgno 1198 db_verify: DB->verify: Packages: DB_VERIFY_BAD: Database verification failed [root@sasha rpm]# db_dump -f dump Packages db_dump: Packages: file size not a multiple of the pagesize db_dump: open: Packages: Invalid argument this happened twice already. my fault for not keeping an eye on the partition, but i figure that the rpm db getting corrupted is a bad thing and shouldn't happen anyway. i don't know of any way to restore that file, using -r and -R options with db_dump yield an unusable db file... it's a pain to lose my rpm db again... any help would be appreciated --sasha Reproducible: Didn't try Steps to Reproduce: i've reproduced it, but not intentionally. my best guess is that it is caused by full disk
Sorry, I dunno of any fix either, although you're basically on the right path by looking for db3 utilities to fix the hash access /var/lib/rpmPackages file. The Right Thing To Do for rpm is to enable logging and transactions in db3, but that hasn't been deemed worth the engineering effort yet.