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

Re: Recovering /var (package status only)



Karsten M. Self wrote:

Here is a good article about recovering a Debian system without having a
backup of /var/lib/dpkg...

http://www.linuxworld.com/2003/0113.petreley.html


Funny, I walked someone through that on irc.debian.org:#debian last
week.  This can be somewhat simplified from Nick's procedure.  Rather
than manually re-selecting packages in dselect, you would take advantage
of the fact that Debian policy requires all packages to create an entry
in /usr/share/doc, with the name of the package.

    # Generate list of installed packages to Re-register previously
    # installed packages as installed, using /usr/share/doc as a
    # fallback package registry.
    dpkg --get-selections $(
        ls /usr/share/doc | grep -v [A-Z] | awk '{print $1 " install"}'
    )

Don't you mean 'dpkg --set-selections ...'?

Question about false positives(/usr/share/doc/ directories that don't correspond to a package): Are they a bug or is there nothing wrong with them? On my system I have the following false positives:

debian-reference-en, debian-reference-common: /usr/share/doc/Debian
doc-linux-text: /usr/share/doc/FAQ
doc-linux-text: /usr/share/doc/HOWTO
doc-debian: /usr/share/doc/debian
libecasound7: /usr/share/doc/ecasound
emu-tools: /usr/share/doc/emu-tools-0.9.4
kpilot, kdebase-doc, korganizer, kdelibs3: /usr/share/doc/kde
kdebase-doc: /usr/share/doc/kdebase
e2fsprogs: /usr/share/doc/libcomerr2
e2fsprogs: /usr/share/doc/libss2
svgalibg1: /usr/share/doc/svgalib
tetex-base, tetex-doc: /usr/share/doc/texmf
libxine-dev: /usr/share/doc/xine

The only one that would cause 'problems' would be 'kde' which would cause a lot of new stuff to be installed, but no real harm would be done especially since I couldn't find any false negatives. The first four and kde and kdebase and texmf appear intentional, but the others seem to be cruft left over from when packages changed names. Should they have been removed by package scripts at some point or were they left there on purpose?



Reply to: