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
This commit is contained in:
parent
a6f3a6a3fd
commit
2d24a9dbe3
|
@ -44,7 +44,14 @@ ${ preinstall_hook }
|
||||||
${ postinstall_hook }
|
${ postinstall_hook }
|
||||||
|
|
||||||
%%preun
|
%%preun
|
||||||
${ uninstall_hook }
|
# Values of $1:
|
||||||
|
# install: (N/A)
|
||||||
|
# upgrade: 1
|
||||||
|
# uninstall: 0
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
${ uninstall_hook }
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
%%files
|
%%files
|
||||||
/var/www/nailgun/plugins/${ name }
|
/var/www/nailgun/plugins/${ name }
|
||||||
|
|
Loading…
Reference in New Issue