Wow, dh_installsystemd is insisting to handle it wrong in this case :-)
Start: calling dh_installsystemd for run-qemu.mount with --no-restart-on-upgrade
=> Ignores --no-restart-on-upgrade and restarts the unit each upgrade
Fix 1: Not calling dh_installsystemd for run-qemu.mount
=> picks up the unit with defaults and restarts the unit each upgrade
Fix 2: Calling dh_installsystemd for run-qemu.mount but with --no-start --no-enable
=> ignores --no-start and restarts the unit each upgrade
Fix 3: Calling dh_installsystemd with --exclude=run-qemu.mount
=> ignores --exclude and restarts the unit each upgrade
At this point I stripped qemu down to not do the binary builds, just wrap the maintscripts.
That allows to iterate quickly and it confirmed (in a minute each) that --exclude, --no-start and --no-restart-on-upgrade all are placing the restart on upgrade rule.
Fix 4: Modify the postinst after dh_installdeb
=> Currently building ...
Wow, dh_installsystemd is insisting to handle it wrong in this case :-)
Start: calling dh_installsystemd for run-qemu.mount with --no-restart- on-upgrade on-upgrade and restarts the unit each upgrade
=> Ignores --no-restart-
Fix 1: Not calling dh_installsystemd for run-qemu.mount
=> picks up the unit with defaults and restarts the unit each upgrade
Fix 2: Calling dh_installsystemd for run-qemu.mount but with --no-start --no-enable
=> ignores --no-start and restarts the unit each upgrade
Fix 3: Calling dh_installsystemd with --exclude= run-qemu. mount
=> ignores --exclude and restarts the unit each upgrade
At this point I stripped qemu down to not do the binary builds, just wrap the maintscripts. on-upgrade all are placing the restart on upgrade rule.
That allows to iterate quickly and it confirmed (in a minute each) that --exclude, --no-start and --no-restart-
Fix 4: Modify the postinst after dh_installdeb
=> Currently building ...