summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kislitsky <akislitsky@mirantis.com>2016-04-06 17:54:16 +0300
committerAlexander Kislitsky <akislitsky@mirantis.com>2016-04-06 18:04:48 +0300
commit2d24a9dbe317c0a7308fc9050e302f8cb84e9503 (patch)
treea681e2859e37f1777e7fa50dbfbb19c9f7cc0d2d
parenta6f3a6a3fdf7854458e248896841010a3eecfb41 (diff)
We shouldn't execute uninstall.sh on plugin upgrade
When package is upgraded the following steps are perfored: - Run the %pre section of the RPM being installed. - Install the files that the RPM provides. - Run the %post section of the RPM. - Run the %preun of the old package. - Delete any old files not overwritten by the newer version. (This step deletes files that the new package does not require.) - Run the %postun hook of the old package. uninstall_hook should be executed only when package removing is performed. Otherwise in case of upgrade plugin changes made in post-install.sh can be removed by unistall.sh Change-Id: Idba866be2556aacc9ac0abeff67afcf34f02d93b Closes-Bug: #1564123
Notes
Notes (review): Verified+1: Fuel CI <fuel-ci-bot@mirantis.com> Code-Review+1: Cody Eilrich <cody.eilrich@ericsson.com> Code-Review+1: Vinod Kumar Yadav <vinod.kumar.v.yadav@ericsson.com> Code-Review+1: Georgy Kibardin <gkibardin@mirantis.com> Code-Review+1: Bulat Gaifullin <bgaifullin@mirantis.com> Code-Review+1: Andriy Popovych <apopovych@mirantis.com> Code-Review+2: Igor Kalnitsky <ikalnitsky@mirantis.com> Code-Review+2: Evgeniy L <eli@mirantis.com> Workflow+1: Evgeniy L <eli@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 08 Apr 2016 13:19:26 +0000 Reviewed-on: https://review.openstack.org/302306 Project: openstack/fuel-plugins Branch: refs/heads/master
-rw-r--r--fuel_plugin_builder/templates/v3/build/plugin_rpm.spec.mako9
1 files changed, 8 insertions, 1 deletions
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 f7e8f86..37dcab5 100644
--- a/fuel_plugin_builder/templates/v3/build/plugin_rpm.spec.mako
+++ b/fuel_plugin_builder/templates/v3/build/plugin_rpm.spec.mako
@@ -44,7 +44,14 @@ ${ preinstall_hook }
44${ postinstall_hook } 44${ postinstall_hook }
45 45
46%%preun 46%%preun
47${ uninstall_hook } 47# Values of $1:
48# install: (N/A)
49# upgrade: 1
50# uninstall: 0
51if [ $1 -eq 0 ]; then
52 ${ uninstall_hook }
53fi
54
48 55
49%%files 56%%files
50/var/www/nailgun/plugins/${ name } 57/var/www/nailgun/plugins/${ name }