Re: yum db lossage

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

 



On Mon, 2006-07-10 at 17:42 -0500, Mikkel L. Ellertson wrote:
> wld wrote:
> 
> > I a afraid that after
> >    rpm --initdb
> > his rpm database is empty... From man rpm
> > 
> >   REBUILD DATABASE OPTIONS
> >       The general form of an rpm rebuild database command is
> > 
> >       rpm {--initdb|--rebuilddb} [-v] [--dbpath DIRECTORY] [--root
> > DIRECTORY]
> > 
> >       Use --initdb to create a new database, use --rebuilddb to 
> > rebuild  the
> >       database indices from the installed package headers.
> > 
> > The only way to get a list of installed packages I know of is
> > to look into the file /var/log/rpmpkgs , generated every night by cron.
> > Then OP could try restore his rpm database by hand, using --justdb
> > option of rpm command.
> > 
> The only problem with that is that RPM needs the .rpm file to do it.
> If it were not for that, and the dependency problems, you could do
> something like:
> 
> for i in $(cat /var/log/rpmpkgs) ; do rpm -ivh --justdb $i ; done
> 
> You could probably get most of them restored by changing to the
> Fedora/RPMS directory on the DVD image, and running:
> 
> for i in $(cat /var/log/rpmpkgs) ; do rpm -ivh --justdb --nodeps $i
> ; done
> 
> You might have to use the --force option instead of the --nodeps
> option, but I would try it with --nodeps first. You could then use
> yum to re-install the ones that are updates, or just download them
> and use rpm to update the database from the files.

And don't forget to run:

# package-cleanup --problems

when you think you're done. This tool is in the yum-utils package. It'll
check your RPM database for broken dependencies.

Paul.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[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