Bug 590710 - --rebuilddb should rebuild db
Summary: --rebuilddb should rebuild db
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 13
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-10 14:28 UTC by Stas Sergeev
Modified: 2011-06-27 16:14 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-06-27 16:14:26 UTC
Type: ---

Attachments (Terms of Use)

Description Stas Sergeev 2010-05-10 14:28:20 UTC
Description of problem:
rpm --rebuilddb
rpmdb: Program version 4.8 doesn't match environment version 4.7
ошибка: ошибка(3) db-30971 из dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
ошибка: невозможно открыть индекс Packages используя db3 -  (-30971)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Upgrade rpm from F12 to F13
2. rpm doesn't work
3. rpm --rebuilddb
Actual results:
The error message quoted above

Expected results:
Rebuilt db

Additional info:
Manually removing __db* helps.

Comment 1 Jim Cromie 2011-04-10 21:38:32 UTC
Id vote for this bug.

I recently corrupted my /var/lib/rpm/* such that sudo rpm --rebuilddb
failed hard:

[jimc@harpo rpm]$ sudo rpm --rebuilddb
rpmdb: Thread/process 21561/3079325376 failed: Thread died in Berkeley DB library
error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 -  (-30974)

I ended up having to delete the files, --initdb,
manually reinstall fedora-release-14-0.7
then sudo yum shell would work,
before installing release-14, repolist etc wouldnt work..

rpm -qa now shows 2 installed packages.
rpm --verify is no help at all, it wont check files unless it thinks
they were installed from rpms.

--rebuilddb should IMHO:

starting with base-packages that should be installed,
verify that the files on the HD match the (supposedly) not-installed rpm,
when a majority of package files are found to match the checksums,
rpm should record the package as installed, such that rpm -qa will report it,
and subsequent rpm --verify will check it.

AFAIK, without a real --rebuilddb, my system is not recoverable
such that I can verify it.  Everything works now, but I cannot know
that the current content of /usr/bin/ is as it should be,
never mind 6 months from now.

perhaps --verifyfiles, --rebuilddbfull, --rescanfs 
is needed to denote the extra work.

Comment 2 Jim Cromie 2011-04-11 05:30:05 UTC
uhm, it seems that verify still works, at least appears to check that
filesystem still looks ok

$ rpm -Vv filesystem-2.4.35-1.fc14.i686 | head -10
.........    /
.........    /bin
.........    /boot
.........    /dev
.........    /etc
.........    /etc/X11
.........    /etc/X11/applnk
.........    /etc/X11/fontpath.d

The main verify complaint still stands though, without rpm -qa
showing whats installed, its hard to enumerate packages to verify.

Worse, installs will happen without checking current files;
I (re) installed perl, and they then appeared in -qa output,
but if config files had been altered by me, the rpmnew clobber
protection would probably not have happened (I didnt check).

Comment 3 Bug Zapper 2011-06-02 14:15:17 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Comment 4 Bug Zapper 2011-06-27 16:14:26 UTC
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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