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

Re: How to rebuild package database (Update)

Am Freitag, 14. März 2008 schrieb Lennart Sorensen:
> On Fri, Mar 14, 2008 at 08:55:23PM +0100, Hans-J. Ullrich wrote:
> > Hi all,
> >
> > accidently I crashed my package database with
> >
> > dpkg --set-selections < packagelist.txt
> >
> > Now aptitude wants to delete a lot and reinstall other packages, which
> > are already installed.
> >
> > I want to correct my database to the already installed package. There is
> > another file with the list of the already installed packages available,
> > which was created by synaptic.
> >
> > How can I teach aptitude, to read this file and let it generate an
> > up-to-date database ?
> Unless one of the backup files in /var/lib/dpkg for status and such
> happen to be valid, then there is no way to restore it since the
> database is the primary source (and probably only) source of the
> information.

Ah, yes, I see. So if it is crashed, then we have a real problem.

> I also fail to imagine how dpkg --set-selections could cause any
> problems.  All it does is change the setting on packages to indicate
> which should be installed and (if you had any packages that were removed
> but not purged) flag some for removal.  Packages that were fully purged
> won't change state since they should be in the list in the first place.

It was not quite a mistake, but I mixed the file "packegelist.txt" (created 
with dpkg --get-selections) from another computer, and so my packagelist was 
not the same as on the required one.
> There should not be any way it could cause reinstall of packages, only
> install or remove when you use --set-selections.

This was, what happened: Some packages were going to be reinstalled, some 
removed, according to the wrong list. However, I still could solve the 
problem, I hope, just take a look in my update-mail.
> --
> Len Sorensen


Reply to: