Browse Source

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
Dmitry Mescheryakov 2 years ago
parent
commit
3554228b2d
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      fuel_plugin_builder/templates/v3/build/plugin_rpm.spec.mako

+ 2
- 0
fuel_plugin_builder/templates/v3/build/plugin_rpm.spec.mako View File

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

Loading…
Cancel
Save