From 83e764260fe95dc3cbffbd00f28401c1717f406a Mon Sep 17 00:00:00 2001 From: Roman Prykhodchenko Date: Tue, 26 Apr 2016 16:54:14 +0200 Subject: [PATCH] Allow optional uninstall.sh Don't put any code to PREUN scripts if uninstall.sh does not exist or is empty. Closes-bug: #1574478 Change-Id: Ie7767e285b8086921a944da4bea9aa9749a0e323 --- fuel_plugin_builder/templates/v3/build/plugin_rpm.spec.mako | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 37dcab5..d55d847 100644 --- a/fuel_plugin_builder/templates/v3/build/plugin_rpm.spec.mako +++ b/fuel_plugin_builder/templates/v3/build/plugin_rpm.spec.mako @@ -48,10 +48,11 @@ ${ postinstall_hook } # install: (N/A) # upgrade: 1 # uninstall: 0 +% if uninstall_hook: if [ $1 -eq 0 ]; then ${ uninstall_hook } fi - +% endif %%files /var/www/nailgun/plugins/${ name }