puppetlabs/puppetdb — pull request #208 by cprice-puppet (2012-07-10 03:00:28+00:00)
Title: (#15075) Improve handling of service start/stop during rpm upgrade/unins...

...tall

Prior to this commit there were a few issues with the way we were
handling interacting with the system's puppetdb service during
rpm upgrade and downgrade. Basically, we were *always* stopping
(and disabling) the service whenever an uninstall occurred; however,
during an upgrade, rpm does an install of the new package followed
by an uninstall of the old package. We weren't treating this
situation differently, so the service was being stopped. This
commit does the following:

* On uninstall, we now check to see if this is part of an upgrade
or not, and we only stop and disable the service if this is
*not* part of an upgrade.

* On upgrade, we stop the service before we install the new package,
and restart it after we finish removing the old package.