#1010260 lintian: false positive maintainer-script-empty if it has conditional exit

#1010260#5
Date:
2022-04-27 10:10:36 UTC
From:
To:
Dear Maintainer,

maintainer-script may have as its only function to forbid package
installation or upgrade. For instance, I have a `preinst` script that
forbids upgrade but does not forbid its installation:

=====
#!/bin/sh
set -e

case $1 in
upgrade)
  echo "************************************************************" >&2
  echo "*** This package cannot be live-upgraded, it is supposed ***" >&2
  echo "*** to be preinstalled in the bootable image             ***" >&2
  echo "************************************************************" >&2
  exit 1
  ;;
esac

#DEBHELPER#

exit 0
=====

In my view, this is a perfectly valid use case, however the check for
"empty maintainer script" in lib/Lintian/Check/MaintainerScripts/Empty.pm
line 86 detects such script as "empty" and reports a warning.

I have posted a comment about the same in salsa gitlab:
https://salsa.debian.org/lintian/lintian/-/commit/aa476eb35498f84eb5214a483cd68be9b28188fe#note_306753