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

Re: debian-policy: Not limit dpkg-divert to install but valid also for upgrade in app. G



On 2008-06-18 13:45 +0200, Raphael Hertzog wrote:

> On Mon, 02 Jun 2008, Russ Allbery wrote:
>> And, actually, should we just remove the if or case guard entirely and
>> just run dpkg-divert unconditionally in preinst?  The only difference at
>> that point is abort-upgrade, and if the new version of the package was
>> removing diversions in its preinst, re-establishing the diversion is the
>> right thing to do.  I'm remembering Ian's previous comments that normally
>> one should not be testing the action in maintainer scripts.
>
> I tend to agree, I can't imagine a scenario where it would be a bad thing
> to do. 
>
> But we certainly don't want to temporarily remove the diversion on upgrade
> so this is ok only for the preinst part.  The postrm part shall stay 
> restricted to the "remove" case.

For the record, running it in the "upgrade" case cannot work at all,
because the new preinst is run _before_ the old postrm.  See #486446 for
an example.

Sven 


Reply to: