For the dpkg-divert commands in the preinst and postrm scripts I followed "man dpkg-divert". They were both run unconditionally.
However, when reinstalling one of the skype-translation-* binaries, I noticed that the diversion was removed, since the dpkg-divert command in the postrm of the overwritten package was run after the new install.
Hmm.. Further testing made me discover a mistake.
For the dpkg-divert commands in the preinst and postrm scripts I followed "man dpkg-divert". They were both run unconditionally.
However, when reinstalling one of the skype-translation-* binaries, I noticed that the diversion was removed, since the dpkg-divert command in the postrm of the overwritten package was run after the new install.
Not good.
Found the solution in this manual: /www.debian. org/doc/ debian- policy/ ap-pkg- diversions. html
https:/
So in the latest version there is a condition that controls when the dpkg-divert command in a postrm script is run.