Right, so there was nothing wrong with the one line of python code.
I'm thinking now there must be some uninstall script or another part of the code where the xdg-utils commands are called.
I have:
- built the .deb as 93.99.2, including the extra line in postint script
- installed that into a fresh Debian 8 VM
- built another .deb as 0.93.99.3, also including the extra line
- installing 93.99.3 over 93.99.2 generates the same errors that installing 0.94 over 0.93.3 does
I can tell the initial modified .deb is working, I stuck 1 print line inside the if statement and then also another print line immediately after the if. Only the latter appeared in stdout, seems convincing to me. The behaviour when installing over 93.99.2 looks so much like it's getting those lines from a different copy of the same script, could that be right? Can't see anything like that in the file structure though
edit: how about the postrm binary? can't see any source for that in the codebase