[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



Package: lintian
Version: 2.114.0ubuntu1
Severity: normal

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

-- System Information:
Irrelevant since I am filing it from a workstation, and the problem
exists in the master branch of the lintian repo.

-- no debconf information


Reply to: