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

Re: Replaces: and pre/post rm



On Thu, Jun 14, 2001 at 04:29:30PM -0400, Richard A Nelson wrote:
> On Thu, 14 Jun 2001, Julian Gilbey wrote:
> 
> > So was the <conflictor's postrm> actually called with the purge
> > option?  It doesn't appear to have done.
> 
> Not that I can find

Good.

> Since both packages must have the same postrm, and they remove *alot*
> of files, things can get really nasty if I'm not careful:
> 	1) Install sendmail
> 	2) customize & play with things
> 	3) Decide to install sendmail-tls
> 	4) hrm, sendmail is no longer needed, but still has some conffiles,
> 	   lets dpkg --purge it
> 	At this point, many files in /etc/mail, /var/spool/mqueue, etc have
> 	now been erased...  This what I don't want to happen to a user...

Ah, very good point.  Why not simply add in the purge section a block
around it which says:

if ! [ -f <some file in the .deb which characterises the sendmail(-tls) packages> ]
then
    delete a lot of files
fi

> > 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'm perusing that now, it might help -- even if I simply rm'd the
> older packages postrm file !

No, no, no.  Don't ever fiddle with dpkg's internal databases like
this.  (There is one very, very rare case I can think of in which this
is necessary, but this isn't it.  And that is where the old prerm has
a trojan or equivalent nasty in it.)

   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: