Re: rpm --rebuild: what does it do?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/19/2010 02:29 PM, Aaron Konstam wrote:
> On Fri, 2010-03-19 at 14:03 -0600, Stuart McGraw wrote: 
>> Hello all,
>> 
>> The man page for "rpm --rebuild", with rather excessive 
>> terseness, says:
>> 
>> > [...] use --rebuilddb to rebuild the database indices
>> > from the installed package headers.
>> 
>> I want to backup the "rpm database".  Presumably I
>> do not need to backup the "database indices" since
>> they are recreated by rpm --rebuild.
>> 
>> Can some translate "rpm database" and "database indices"
>> into filenames?  Thanks.
>> 
>> [P.S., I quickly scanned the Max RPM book, especially
>> chapters 6 and 7 and did not find an answer there though
>> it is a long book and I may have missed it.] 
> 
> I thought the answer was simple. The rpm databases are named:
> /var/lib/rpm/__db.00x where x =1,2,3,4
> 
> However I notice there are other files called:
> /var/lib/rpmrebuilddb.2702/__db.00x where x=1,2,3
> 
> I  have never seen them before but they seem to be  related to rpm
> --rebuilddb

I think those are left over from a failed/interrupted/partial
rebuild.  When I do a rebuild with -vv here, the last command
shown is "D: removing directory /var/lib/rpmrebuilddb.9081"

I did an experiment (actually quite a few but what they 
led to was):

mkdir /tmp/foo

rm /tmp/foo/*
rpm --dbpath /tmp/foo --initdb
cp -p /var/lib/rpm/__db* /tmp/foo
rpm --dbpath /tmp/foo --rebuilddb
# All the files in /var/lib/rpm/ are now in /tmp/foo/ but are smaller.
# The __db* files now have current time, not time they had in /var/lib/rpm/.
rpm --dbpath /tmp/foo --verify coreutils
# <reports that coreutils is not installed>

rm /tmp/foo/*
rpm --dbpath /tmp/foo --initdb
cp -p /var/lib/rpm/Packages /tmp/foo
rpm --dbpath /tmp/foo --rebuilddb
# Above comand takes long time.  Sizes of files in /tmp/foo/ now same
# or close to size of files in /var/lib/rpm/.  Time of Packages file
# unchanged from /var/lib/rpm/.
rpm --dbpath /tmp/foo --verify coreutils
# <reports coreutils is ok>

>From this is seems like /var/lib/rpm/Packages is *the* 
database.  But I would still appreciate confirmation 
from someone.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux