maybe yum-updatesd? (was Re: yum updates corrupting rpmdb)

Joe Smith jes at martnet.com
Fri Jan 4 17:17:10 UTC 2008


Craig White wrote:
> ...
> almost sounds like an incomplete upgrade occurred, perhaps with the
> wrong version of berkley-db4 or python installed.
> 
> Did you ever go through things like installing yum-tools and
> package-cleanup?

Hey, thanks for the ideas!

"rpm -V db4" was clean--something else I should check?

I always assumed that if "rpm --rebuilddb" succeeded, then the database 
should be ok. But it looks like my assumption was wrong:

# cd /var/lib/rpm/
# /usr/lib/rpm/rpmdb_verify Packages
# /usr/lib/rpm/rpmdb_verify Requirename
db_verify: Page 223: bad prev_pgno 0 on overflow page (should be 119)
db_verify: Page 223: overflow item incomplete
db_verify: Requirename: DB_VERIFY_BAD: Database verification failed
# for f in *; do echo "$f"; /usr/lib/rpm/rpmdb_verify $f; done
Basenames
Conflictname
Dirnames
db_verify: Page 1982: bad page number 191
db_verify: Dirnames: DB_VERIFY_BAD: Database verification failed
Filemd5s
db_verify: Page 4635: bad page number 89
db_verify: Filemd5s: DB_VERIFY_BAD: Database verification failed
Group
db_verify: Page 18: overflow page of invalid type 2
db_verify: Group: DB_VERIFY_BAD: Database verification failed
Installtid
Name
Packages
Providename
db_verify: Page 342: bad page number 105
db_verify: Providename: DB_VERIFY_BAD: Database verification failed
Provideversion
db_verify: Page 110: bad prev_pgno 0 on overflow page (should be 112)
db_verify: Page 110: overflow item incomplete
db_verify: Provideversion: DB_VERIFY_BAD: Database verification failed
Pubkeys
Requirename
db_verify: Page 223: bad prev_pgno 0 on overflow page (should be 119)
db_verify: Page 223: overflow item incomplete
db_verify: Requirename: DB_VERIFY_BAD: Database verification failed
Requireversion
db_verify: Page 191: partially zeroed page
db_verify: Requireversion: DB_VERIFY_BAD: Database verification failed
Sha1header
Sigmd5
db_verify: Page 32: bad page number 223
db_verify: Page 32: invalid prev_pgno 119
db_verify: Sigmd5: DB_VERIFY_BAD: Database verification failed
Triggername

I found an old (2003) suggestion for rebuilding the Packages db:
 > mv Packages Packages-ORIG
 > /usr/lib/rpm/rpmdb_dump Packages-ORIG |
 >   /usr/lib/rpm/rpmdb_load Packages

Running that on each db...
# for f in Requireversion Provideversion Providename Group Filemd5s 
Dirnames; do echo "$f"; mv "$f" "$f.orig" && /usr/lib/rpm/rpmdb_dump 
"$f.orig" | /usr/lib/rpm/rpmdb_load "$f"; done
Requireversion
db_load: Transactional Data Store incompatible with environment
Provideversion
db_load: Transactional Data Store incompatible with environment
Providename
db_load: Transactional Data Store incompatible with environment
Group
db_load: Transactional Data Store incompatible with environment
Filemd5s
db_load: Transactional Data Store incompatible with environment
Dirnames
db_load: Transactional Data Store incompatible with environment

I have no idea what that message means, but it doesn't mean the command 
failed, apparently:

# for f in `ls | grep -v '\.'`; do echo "$f"; /usr/lib/rpm/rpmdb_verify 
$f; done
Basenames
Conflictname
Dirnames
Filemd5s
Group
Installtid
Name
Packages
Providename
Provideversion
Pubkeys
Requirename
Requireversion
Sha1header
Sigmd5
Triggername

Looks clean now.

I'm running a "rpm -Va" just now, and so far it looks reasonable, so 
maybe the problem is done now.

I have no idea what I'm doing here, and I still don't understand if 
"--rebuilddb" was missing something, or what.

Clues welcomed.

PS: Oops. No, now the "rpm -Va" is finding stuff that looks like some 
parts of the last update that failed were partially installed. Maybe I 
need to go back and repeat the latest package installs to make sure 
everything is clean.

Maybe time to punt and re-install f8.

<Joe




More information about the fedora-list mailing list