Allow empty uninstall hooks

Without no-op, empty uninstall hook will cause invalid 'if' statement
to be created. As a result, uninstallation of such a package fails.

Change-Id: Idb12870db05b311f6c18cf0eb7d14a200ced6983
This commit is contained in:
Dmitry Mescheryakov 2016-06-22 15:04:42 +03:00
parent 82191ca16b
commit 3554228b2d
1 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,8 @@ ${ postinstall_hook }
# uninstall: 0 # uninstall: 0
% if uninstall_hook: % if uninstall_hook:
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
# insert no-op to allow empty or comment-only uninstall hooks
:
${ uninstall_hook } ${ uninstall_hook }
fi fi
% endif % endif