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

Re: Replaces: and pre/post rm



On Thu, Jun 14, 2001 at 01:42:08PM -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.
> > [...]
> No, must've been hallucinating again...

So was the <conflictor's postrm> actually called with the purge
option?  It doesn't appear to have done.

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

Why?  When one of the packages is finally purged, surely that will do
the job of cleaning out any mess from either of them (as you appear to
indicate that they use the same manually created files).

You might also be interested in the call:
   <conflictor's-prerm> remove in-favour <package> <new-version>
This might possibly help you.  See the policy manual, section 6.4.

> I guess, given that, I could even have ${package}.postinst issue
> a dpkg --purge for the alternative package...

Yuck -- no way!

   Julian

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

         Julian Gilbey, Dept of Maths, Queen Mary, Univ. of London
       Debian GNU/Linux Developer,  see http://people.debian.org/~jdg
  Donate free food to the world's hungry: see http://www.thehungersite.com/



Reply to: