[NCLUG] apt-get error code
Matt Taggart
matt at lackof.org
Mon Apr 17 01:54:29 MDT 2006
Chad Perrin writes...
> Actually, just a little while ago, I decided to try making backup copies
> of /var/lib/dpkg/info/kdebluetooth* followed by deleting them. I
> figured it was worth a try. The end result was that apt-get threw an
> error but worked again anyway. Thereafter, everything has been kosher.
You made the error in the script go away by making the script go away :)
dpkg complained that it was missing, but proceeded because there was nothing
else it could do. Let's hope the postrm script didn't need to do anything
important like backup your data or something ...
> Because this was a Debian install from a Knoppix CD that defaulted to
> including some now nonexistent repositories in sources.list, the
> information in some of the /var/lib/dpkg/info files no longer matched
> the reality of what was available in the repositories, and the apt
> system wasn't able to reconcile it with the still-extant repositories.
The stuff in /var/lib/dpkg/info reflects the reality of stuff on the system,
having apt sources go away doesn't change that. Information about apt's view
of the repositories is kept in /var/cache/apt/ and is updated with `apt-get
update`. You should always run an `apt-get update` after changing sources,
before using apt-get. apt compares it's view of the repositories with dpkg's
view of what's currently on the system in order to determine what to install.
If you forgot to do an update, you'd have a stale view of the repositories and
when apt went to fetch the packages it wanted, it might find that they're no
longer available (before installing anything). If the packages are still they
are it will happily grab them and install them, and that should work as well
as it would have the day you ran the update.
Probably what you ran into is an untested upgrade path. In general you should
be able to upgrade from one Debian version to any newer Debian version of a
package (forward only, backward usually works but isn't supported). If you're
mixing in 3rd party stuff, that's less likely to be tested and harder to
support.
--
Matt Taggart
matt at lackof.org
More information about the NCLUG
mailing list