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