Can't uninstall package opennebula-server if service not running
|Assignee:||Javi Fontan||% Done:|
|Target version:||Release 4.12.1|
|Affected Versions:||OpenNebula 4.12|
It seems there is a problem with the postun scriptlets in the rpm. It suppose that the service is running, and if it's not the case, fails to run this postun script. Therefor, yum/rpm is not able to uninstall this package.
The best practice for RPM scriptlet for that specific case is to return true:
preuninstall scriptlet (using /bin/sh): if [ $1 = 0 ]; then /sbin/service opennebula stop >/dev/null /sbin/chkconfig --del opennebula >/dev/null fi
preuninstall scriptlet (using /bin/sh): if [ $1 = 0 ]; then /sbin/service opennebula stop >/dev/null ||: /sbin/chkconfig --del opennebula >/dev/null fi
Btw I can't find the spec files in the git repos?