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

Bug#29522: diversions



>are the examples for diversions are wrong, or do I miss something?
>dpkg-divert has to be called for an upgrade as well and for the purge
>of a package as well.

dpkg-divert has to be called once to install a diversion, and once to
remove it.  If it is called twice, this does no harm; the last setting
is the one which remains.

Assuming every version of your package needs the same diversion, call
"dpkg-divert --add" in "preinst install", and "dpkg-divert --remove" in
"postrm remove".

dpkg-divert doesn't need to be called during an upgrade, because the
diversion is already installed.  It doesn't need to be called on purge,
because the package can only be purged after it has been removed; the
diversion will already have been removed.

-- 
Charles Briscoe-Smith
White pages entry, with PGP key: <URL:http://alethea.ukc.ac.uk/wp?95cpb4>
PGP public keyprint: 74 68 AB 2E 1C 60 22 94  B8 21 2D 01 DE 66 13 E2


Reply to: