Bug 18159 - rpm -rebuilddb doesn't do anything
rpm -rebuilddb doesn't do anything
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.0
i386 Linux
high Severity high
: ---
: ---
Assigned To: Jeff Johnson
:
: 18841 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-10-02 20:09 EDT by Don Beusee
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-10-03 13:08:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
how to resolve db1/db3 issues (4.70 KB, text/plain)
2000-10-03 13:08 EDT, Jeff Johnson
no flags Details

  None (edit)
Description Don Beusee 2000-10-02 20:09:09 EDT
I took the following steps to install the 7.0 version of RPM on my 6.2
system:

Grabbed rpm-3.0.6.i386.tar.gz and untar'd it from /.
installed these packages:
glibc-devel-2.1.92-14.i386.rpm
db3-devel-3.1.14-6.i386.rpm
db3-3.1.14-6.i386.rpm
db2-devel-2.4.14-4.i386.rpm
db2-2.4.14-4.i386.rpm
db1-devel-1.85-4.i386.rpm
db1-1.85-4.i386.rpm
bzip2-1.0.1-3.i386.rpm
rpm2html-1.4-4.i386.rpm
rpm-python-4.0-4.i386.rpm
rpm-devel-4.0-4.i386.rpm
rpm-build-4.0-4.i386.rpm
rpm-4.0-4.i386.rpm
glibc-2.1.92-14.i686.rpm
rpmlint-0.14-4.noarch.rpm
rpmdb-redhat-7.0-0.20000830.i386.rpm

After this step, any other rpm commands would tell me I need to run
-rebuiddb.  When I did this, it did nothing.  strace shows a bunch of
fstat32() calls with only hex args are failing.  What is missing?
The command returns very quickly with no messages, appearing to do
nothing.  No error, no converted database.  Re-installing
rpm-3.0.6.i386.tar.gz allows rpm (3.0.6) to work, proving the database is
not converted.
Comment 1 Don Beusee 2000-10-02 20:14:27 EDT
Actually I think it was fstat64().
Comment 2 mhart 2000-10-02 23:31:12 EDT
Shouldn't that be rpm --rebuilddb (note the two '-' characters), hopefully this 
will squash this bug quickly :)
Comment 3 Don Beusee 2000-10-03 02:01:42 EDT
No such luck.  I did use --rebuilddb (2 '-'s).
# rpm --rebuilddb
# rpm -q -a
# 
Somehow it doesn't even complain any more that I need to rebuild.
Here is the strace for rpm --rebuilddb:
 open("/var/lib/rpm/Packages", O_RDONLY) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat64(0x3, 0xbffff700)                = 0
lseek(3, 0, SEEK_SET)                   = 0
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0a\25\6\0\7\0\0\0\0\20\0\0\0\10"..., 4096) =
4096
fcntl(3, F_SETLK, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
open("/var/lib/rpmrebuilddb.2444/Packages", O_RDWR|O_CREAT|O_EXCL, 0644) = 4
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
fstat64(0x4, 0xbffff670)                = 0
lseek(4, 0, SEEK_SET)                   = 0
read(4, "", 256)                        = 0
stat64(0x8058a18, 0xbffff6a0)           = 0
getpid()                                = 2444
time(NULL)                              = 970552740
close(4)                                = 0
stat64(0x400fc5dd, 0xbfffef60)          = 0
brk(0x805c000)                          = 0x805c000
old_mmap(NULL, 274432, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x402b5000
open("/var/lib/rpmrebuilddb.2444/Packages", O_RDWR) = 4
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
fstat64(0x4, 0xbffff6f0)                = 0
lseek(4, 0, SEEK_SET)                   = 0
read(4, "", 4096)                       = 0
lseek(4, 0, SEEK_SET)                   = 0
write(4, "\0\0\0\0\0\0\0\0\0\0\0\0a\25\6\0\7\0\0\0\0\20\0\0\0\10"..., 4096) =
4096
lseek(4, 8192, SEEK_SET)                = 8192
write(4, "\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\2\0"..., 4096) =
4096
fsync(4)                                = 0
fcntl(4, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
brk(0x805e000)                          = 0x805e000
lseek(3, 4096, SEEK_SET)                = 4096
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) =
4096
lseek(3, 8192, SEEK_SET)                = 8192
read(3, "\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\2\0"..., 4096) =
4096
close(3)                                = 0
munmap(0x40272000, 274432)              = 0
close(4)                                = 0
munmap(0x402b5000, 274432)              = 0
stat64(0xbffffb00, 0xbffff930)          = 0
rename("/var/lib/rpmrebuilddb.2444/Packages", "/var/lib/rpm/Packages") = 0
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)     = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
stat64(0xbffffb00, 0xbffff930)          = -1 ENOENT (No such file or directory)
rmdir("/var/lib/rpmrebuilddb.2444")     = 0
_exit(0)                                = ?

I left the system in this state in case you need more info.
BTW: file reports:
# file /var/lib/rpm/Packages
/var/lib/rpm/Packages: Berkeley DB 2.X Hash/Little Endian (Version 7, Logical
sequence number: file - 0, offset - 0, Bucket Size 4096, Overflow Point 2048,
Last Freed 0, Max Bucket 0, High Mask 0x0, Low Mask 0x0, Fill Factor 0, Number
of Keys 0)
# 
If I re-install rpm 3.0.6, it will correctly be able to list all the packages I
have installed.
Comment 4 Jeff Johnson 2000-10-03 13:08:14 EDT
Created attachment 3690 [details]
how to resolve db1/db3 issues
Comment 5 Don Beusee 2000-10-04 06:09:06 EDT
I have resolved the problem.  I removed Packages, installed the updated popt*
packages, and re-ran rpm --rebuilddb and it worked.
Comment 6 Jeff Johnson 2000-10-10 17:19:31 EDT
*** Bug 18841 has been marked as a duplicate of this bug. ***

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