cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
yum list yum
yum.noarch 3.4.3-154.el7.centos
Repo: https://github.com/patsevanton/simple-package-update
I build 1-th and 2-th version command
mvn clean package
When update 1-th version to 2-th
Running transaction
Updating : simple-package-update-1-2.noarch 1/2
Run postinstall.sh
Run preremove.sh
Cleanup : simple-package-update-1-1.noarch 2/2
Verifying : simple-package-update-1-2.noarch 1/2
Verifying : simple-package-update-1-1.noarch 2/2
Updated:
simple-package-update.noarch 0:1-2
First
Run postinstall.sh
Second
Run preremove.sh
How correct update rpm if preremove.sh scipt run after postinstall.sh?
preremove.sh contain deregister service
postinstall.sh contain register service