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

Re: dpkg problem

[ouch! next time, please hit enter after +/- 72 characters.]

On Tue, Jul 10, 2001 at 12:08:27AM -0700, David Fuchs wrote:
>     I've recently installed Debian (Potato) on a personal computer,
> and I'm having some difficulty with the package manager (dpkg) that came
> with it.  The problem came up after I installed the Ximian Gnome packages
> (via apt-get).  Once that had completed, I had a working copy of Ximian
> Gnome (and all it's other installed applications).  I then decided to
> upgrade XFree86 to v4.1.  During the upgrade, I backed up and removed
> the contents of /etc/X11 and /usr/X11R6, just to start fresh.

Don't use apt-get for this directly, use dselect, the proper frontend.

Don't use rm -rf for this directly, use dselect, the proper frontend.

>     Once I had XFree86 4.1 installed, I needed to re-install some of the
> Ximian Gnome packages (namely gdm, as it's config rested in /etc/X11/gdm).
> Upon running `dpkg --install', I found that it never actually install gdm.
> Sure enough, it created the directory structure under /etc/X11/gdm, but
> there were no files to speak of.  The backup I had displayed a number
> of files (sessions and config data).  I tried `dpkg --install' again,
> and put it in the background.  I noticed during the install, that it was
> creating the proper files that I was missing, but they were suffixed with
> '.dpkg-new'.  Once `dpkg --install' had completed, it removed those files
> rather than renaming them (to chop the .dpkg-new off).  Hence my problem.

Don't use dpkg for this directly, use dselect, the proper frontend.

>     So the question is, why did dpkg not install the files properly?
> Obviously it's keeping track of what's installed (or should I say, what
> it *thinks* is installed).  dpkg's assumptions don't help me, however,
> and I can't be certain my applications are installed correctly if it
> goes removing things after the fact.  How can I force dpkg to *forget*
> about what I've already installed, so I can install it again?  Better yet,
> is there a way to force a proper re-install with dpkg?

You never completely removed the packages, probably.  There is "remove",
which removes the binaries etc., and there is "purge", which also
removes configfiles.

When you only "remove", and later reinstall, your original configfiles
will still be inplace.  That is, unless you have removed some of these
files while the package was removed, then it will not put a new configfile
in if it finds that the old one is gone.  This is just like when upgrading
an installed package:  if you removed a configfile on the old version,
you don't expect it to reappear after upgrade.

>     One way I've found to re-install, is to use `dpkg-deb --extract
> <filename> /', but that's not good, as it kind of defeats the point
> of dpkg, as dpkg is used to not only extract, but to configure things
> you install as well, correct?  I've also found another way, which is to
> remove the list files associated with a program (I think I found them in
> /var/lib/dpkg/status/info/* ??).  Again, this defeats the point of dpkg,
> as dpkg should be a package manager on it's own accord, so I shouldn't
> need to be deleting things.  Of course, after deleting a bunch of those
> list files, dpkg complains whenever I run it that it's missing things.
> It would be great if someone could tell me how to repair this as well...

Please, for your own sake, do not hack into the package management system
at this level, until you have read all the documentation, in which case
the above explanation would have been more evident from the start.



Reply to: