Re: Bug #32888: The old `base' package.
On Tue, 9 Mar 1999 email@example.com wrote:
> *- On 9 Mar, Santiago Vila wrote about "Re: Bug #32888: The old `base' package."
> > I think the following could be done:
> > In base-files.postinst, test for the existence of
> > /var/lib/dpkg/info/base.list. If it does exist, show a message saying:
> > "You have the old base package installed. This package is completely
> > harmless and since it is essential, it should not be removed, but if
> > it bothers you, please read /usr/doc/base-files/old-base-package"
> To remove the obsolete base package:
> 1) Delete /var/lib/dpkg/base.list
> 2) Execute 'touch /var/lib/dpkg/base.list'
> 3) Execute 'dpkg --force-remove-essential --purge base'
> * dpkg will complain loudly about removing an essential package but
> since you have zero'ed out the list of files that the obsolete base
> package controls this will cause no harm.
Hmmm, this stuff looks like a sledgehammer vs. fly solution.
(going strictly from memory)
Didn't someone post the message from Bruce Perens that gave the fix,
and it went something like this...
if [ -G info/base.list ]; then
cp status status.orig || exit
sed '/Package: base$/,/^$/d' status.orig > status || exit
cp available available.orig || exit
sed '/Package: base$/,/^$/d' available.orig > available || exit
In addition to being the _recommended_ way to handle the problem,
it is cheaper than writing docs, fiddling around, then firing up dpkg.
The worst that can happen is that someone ends up with a system that
doesn't know it has a `base' package (should never happen if used in a
.postinst), or dpkg can't find a proper status or available file
because a sed command failed (fix by renaming the .orig file
and re-running the script, that would probably be a good thing to
I really don't understand why you think you have to --purge, it is not
like there are unwanted files on the system. There is an unwanted entry
in dpkg's database, and dpkg doesn't know how to remove an entry without
removing everything in the entry.list file - so you have to do it
manually. The _only_ way anything can get "hosed" is if dpkg gets run.
[just finished reading this thread...]
So ya decided to bother the users with a trivial problem they probably
don't even know about, and then you only do half the fix!
Yeesh, and ya wonder why some say that Debian is hard to figure out.
(I sure hope my memory is functioning today ;)