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

Re: diversions



Henrique M Holschuh <hmh@debian.org> wrote:
>Also, please understand one thing about diversions: once you add one,
>you must keep the code to *remove* it around. Even if stop doing a
>diversion, you will need to move the code to remove it from the *rm
>scripts to the postinst script (to remove it on upgrades from old
>packages) -- and you'll stay with that cruft in your postinst for as
>long as the package is in Debian (or for two full Debian stable
>releases after the one where the diversion was removed, whichever
>happens sooner).

Is this some kind of insurance against problems in the upgrade? When you
upgrade a package, the old package's prerm is run (with 'upgrade' as the
first argument) before doing anything else, and the old postrm is also
called somewhere along the line. Given that, it seems sensible to let
the old version of the package worry about cleaning up after itself.

The main situation where you need to be concerned about old versions of
your package is where you've previously made a mistake in the maintainer
scripts.

-- 
Colin Watson                                     [cjw44@flatline.org.uk]



Reply to: