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

Re: Purging a replaced program



/me rushes in where gurus fail to tread... :-)

On Wed, 2002-02-06 at 13:25, Jaldhar H. Vyas wrote:
> This problem was originally posted to debian-mentors but is reposted here
> to get a wider audience.  The background is webmin and webmin-ssl are
> interchangeable (except the latter has ssl enabled.)  They provide,
> conflict, and replace each other.  A user reported that if he installed
> webmin, then webmin-ssl he was then not able to purge webmin.

I tried it myself.  Here's what I got:

server1:~# dpkg --purge webmin
(Reading database ... 118477 files and directories currently installed.)
Removing webmin ...
Purging configuration files for webmin ...
update-rc.d: /etc/init.d/webmin exists during rc.d purge (use -f to force)
dpkg: error processing webmin (--purge):
 subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
 webmin
server1:~# 

And, lo and behold, /etc/init.d/webmin does exist in both packages, so
it should definitely not be removed.

I would give the init script in webmin-ssl the name "webmin-ssl", so
that both init scripts can be installed at the same time (and purged
properly).  Each will have to have some way of knowing which of the two
packages is installed, or have some other way of knowing about each
other so webmin doesn't get started twice.

> Here is what I get after installing webmin, then webmin-ssl  (Both
> provide, conflict, and replace each other.):
> 
> 
> $ dpkg -l | grep webmin
> ic  webmin         0.92-1         Web-based administration toolkit
> ii  webmin-core    0.92-1         core modules for webmin
> ii  webmin-ssl     0.92-2         Web-based administration toolkit
> 
> Qestion 1:  Why is webmin shown as ic. 

On my system:

rc  webmin         0.92-1         Web-based administration toolkit
un  webmin-core    <none>         (no description available)
un  webmin-squid   <none>         (no description available)
ii  webmin-ssl     0.92-2         Web-based administration toolkit

That would appear to be more correct.

> Certainly all its' conffiles should belong to webmin-ssl shouldn't they?

It would seems so, if webmin.conffiles is gone.  But see below.

> /var/lib/dpkg/info/webmin.list exists but it is 0 length.
> /var/lib/dpkg/info/webmin.conffiles does not exist.
> /var/lib/dpkg/info/webmin.postrm still exists.

My webmin.list is nonzero in size, and contains /etc/webmin and its
subdirectories (no files).

> Question 2:  why is webmins' postrm still hanging around?

For purging purposes.  When you run "dpkg --purge foo", foo's postrm has
to be called to do miscellaneous cleanup; for example, if your program
has log files or spool files laying around.

I notice that the purge case for webmin's postrm does this:

test -f /etc/webmin/miniserv.users && rm -f /etc/webmin/miniserv.users
test -e /etc/webmin && rm -rf /etc/webmin
test -e /var/log/webmin && rm -rf /var/log/webmin

That's definitely incorrect in the case where webmin-ssl is installed.




Reply to: