My nux-tools review comments apply to x11-common too. The following are for x11-common:
What's the reason for doing this in preinst rather than postinst configure? It's fine in this case but usually we do things in postinst where possible.
What about adding a "Breaks: nux-tools (<< 4.0.8+18.04.20180613.5-0ubuntu1)" to x11-common, and making the script not do the fix up if we're upgrading from the new version ("if dpkg --compare-versions "${2}" lt 1:7.7+19ubuntu8; then do stuff; fi")?
I think it's a good idea generally to make fix up actions in maintainer scripts strictly limited to certain package versions and this will mean if you still have nux-tools installed you have to upgrade it to the fixed version, so the removal can only have happened earlier than x11-common 1:7.7+19ubuntu8.
Cheers!
My nux-tools review comments apply to x11-common too. The following are for x11-common:
What's the reason for doing this in preinst rather than postinst configure? It's fine in this case but usually we do things in postinst where possible.
What about adding a "Breaks: nux-tools (<< 4.0.8+18. 04.20180613. 5-0ubuntu1) " to x11-common, and making the script not do the fix up if we're upgrading from the new version ("if dpkg --compare-versions "${2}" lt 1:7.7+19ubuntu8; then do stuff; fi")?
I think it's a good idea generally to make fix up actions in maintainer scripts strictly limited to certain package versions and this will mean if you still have nux-tools installed you have to upgrade it to the fixed version, so the removal can only have happened earlier than x11-common 1:7.7+19ubuntu8.