when 'which' fails to find the default display manager (lightdm in your case), it returns with a non-zero return code, which stops the postinst script from executing because of the 'set -e' at the top.
I think the fix would be to modify lightdm's postinst to do
As far as I can tell, this bug happens in lxdm's postinst script, in this bit:
DAEMON_ NAME=$( which "$DEFAULT_ DISPLAY_ MANAGER" 2>/dev/null)
when 'which' fails to find the default display manager (lightdm in your case), it returns with a non-zero return code, which stops the postinst script from executing because of the 'set -e' at the top.
I think the fix would be to modify lightdm's postinst to do
DAEMON_ NAME=$( which "$DEFAULT_ DISPLAY_ MANAGER" 2>/dev/null || true)