From 3554228b2d756d939195444379b1ea41a17adcf8 Mon Sep 17 00:00:00 2001 From: Dmitry Mescheryakov Date: Wed, 22 Jun 2016 15:04:42 +0300 Subject: [PATCH] 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 --- fuel_plugin_builder/templates/v3/build/plugin_rpm.spec.mako | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fuel_plugin_builder/templates/v3/build/plugin_rpm.spec.mako b/fuel_plugin_builder/templates/v3/build/plugin_rpm.spec.mako index d55d847..df3abdd 100644 --- a/fuel_plugin_builder/templates/v3/build/plugin_rpm.spec.mako +++ b/fuel_plugin_builder/templates/v3/build/plugin_rpm.spec.mako @@ -50,6 +50,8 @@ ${ postinstall_hook } # uninstall: 0 % if uninstall_hook: if [ $1 -eq 0 ]; then + # insert no-op to allow empty or comment-only uninstall hooks + : ${ uninstall_hook } fi % endif