Soren Stoutner
2025-01-16 22:00:01 UTC
Reply
Permalinkpackage was using dpkg-divert. In discussion with upstream, I found a
solution that doesnât require dpkg-divert.
https://github.com/svarshavchik/courier/issues/56
My question now is how to safely drop the diversion. Currently courier-
mta.preinst includes:
if [ "$1" = "install" ]; then
dpkg-divert --package courier-mta --add --rename \
--divert /usr/bin/addcr.ucspi-tcp /usr/bin/addcr
dpkg-divert --package courier-mta --add --rename \
--divert /usr/share/man/man1/addcr.ucspi-tcp.1.gz /usr/
share/man/man1/addcr.1.gz
fi
https://salsa.debian.org/debian/courier/-/blob/master/debian/courier-mta.preinst?ref_type=heads
And ourier-mta.postrm includes:
if [ "$1" = "remove" ]; then
dpkg-divert --package courier-mta --remove --rename \
--divert /usr/bin/addcr.ucspi-tcp /usr/bin/addcr
dpkg-divert --package courier-mta --remove --rename \
--divert /usr/share/man/man1/addcr.ucspi-tcp.1.gz /usr/
share/man/man1/addcr.1.gz
fi
https://salsa.debian.org/debian/courier/-/blob/master/debian/courier-mta.postrm?ref_type=heads
Removing the preinst is easy so that the diversion doesnât happen on new
installs, but my question is how to correctly handle the postrm so that the
diversion is removed from current installs on upgrade.
--
Soren Stoutner
***@debian.org
Soren Stoutner
***@debian.org