Re: Replaces: and pre/post rm
On Wed, 13 Jun 2001, Julian Gilbey wrote:
> On Wed, Jun 13, 2001 at 10:27:21AM -0400, Richard A Nelson wrote:
> >
> > The problem comes when the user replaces the non-ssl with the ssl
> > version (or visa versa): the postrm script on the replaced version
> > is apparently called with the PURGE option.
>
> Are you sure? As far as I can tell, the purge option should only be
> used by dpkg when all of the conffiles are removed as well. If you
> are overwriting all of the files in the non-ssl package, then the
> postrm should be called with the 'disappear' argument instead. This
> may be something to bring up on debian-dpkg@lists.debian.org.
No, must've been hallucinating again...
I don't see (the echo statements indicating) the 'disappear', but
all that is left when switching from SSL to non-SSL are:
*) /var/lib/dpkg/info/${package}.postrm
*) /var/lib/dpkg/info/${package}.list
*) a couple of conffiles that are named differently:
-) /etc/logrotate.d/{sendmail,sendmail-tls}
-) /etc/cron.daily/{sendmail,sendmail-tls}
The few conffiles are because the corresponding dh_ commands don't allow
me the choice of renaming the script (ala dh_installinit).
That leaves me with the ${package}.postrm, which I guess will have to
contain all the intelligence to:
*) If the alternative package is installed, do nothing
*) If the alternative package is *NOT* installed, kill straggling
files.
I guess, given that, I could even have ${package}.postinst issue
a dpkg --purge for the alternative package...
--
Rick Nelson
* Caytln slaps Lisa
<Caytln> catfight :P
<LisaHere> Watch it girl, I like that.
<LisaHere> :)
<Caytln> figures :D
Reply to: