I'm trying to test a basic fix (adding a test for the path before the xdg-desktop-menu lines, also indenting the xdg-desktop-menu lines and the the blank line after those to make those lines execute contingent on the if statement). It's almost like make_deb_package.py is using the old postinst script, despite copying the correct file to the temporary directory used to build the package. So my coding syntax has got to be wrong.
Here's the line I'm adding:
if os.path.exists('/usr/share/desktop-directories'):
Other than the correct indentation to delineate the codeblock, what could be the issue? Could it actually be using the old script? Am I not allowed to supply literal string values?