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

Re: dpkg problem



Joost Kooij wrote:

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

   Sorry, I've corrected this now...


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.


The Ximian Gnome crew had the option to install via apt-get. I used that option...



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


It wasn't exactly `rm -rf' that I used to rename those folders... but I see your point.


   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.

Alright, sir, I believe we're vitiating the goal of this mailing list. It would be wonderful if you could back up the monomaniacle inclination toward 'dselect' in your last three statements with some explanation. I'm looking for information on dpkg, not dselect. If I absolutely must use dselect, I would like to know why, and what functionality it provides to Debian that dpkg (or one of the dpkg utilities such as 'dpkg-deb') does not. I'm doing this to learn, and using the base tools for debian package management will inherently tell me how dselect works.


   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.

   Ok.


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.

Sounds good. It looks like the reason dpkg removed those 'dpkg-new' files was because dpkg found the package was already installed. This was because it was never purged, only removed. I will attempt to purge everything, and then install. A purge should remove any list files associated with the particular packages, correct? If so, an install (I take it you must do an install, not re-install, after purging) should re-construct those list files? I certainly hope so.


   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.

   Yes, I'll make sure I've read all the dpkg documentation.


Cheers,


Joost


Thanks,

-David Fuchs



Reply to: