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

Re: Purging a replaced program



On 9 Feb 2002, Jeff Licquia wrote:

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

Thankyou I appreciate it.

> 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.
>

The thing is, I could swear that the conflict/replace/provide combination
was enough to replace one package with another.  Didn't that use to work
or am I hallucinating?

> 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.
>

How can the  packages know each other is installed?  I can't call dpkg -L
while in a maintainer script right?  Would test -f
/var/lib/dpkg/info/webmin.list be evil or is that ok?

> > 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.
>

Hmm I just tried this again and go the same results as before.  Did you
use dpkg -i or apt-get install?  I used the former.


> > 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).
>

Again I get the same results as before.  This is with dpkg 1.9.19 on an
uptodate sid system btw.


> > 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.
>

So here again I should check that webmin-ssl is installed first right?

I hope the crypto in main issue gets resolved so I cn just drop this whole
mess.

-- 
Jaldhar H. Vyas <jaldhar@debian.org>
It's a girl! See the pictures - http://www.braincells.com/shailaja/




Reply to: