Open cwells opened 11 years ago
Whoa, pretty bummed RPM scriptlets aren't fully supported. posttrans is particularly important when the fpm package I'm creating obsoletes an existing package whose postun removes the binary symlinks.
tldr; +1
+1
+1
+1
See http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Scriptlet_Ordering
Note that during an upgrade, the order of scripts will be:
1) before-install 2) after-install 3) before-remove 4) after-remove
I discovered the problem when trying to create an rpm that would stop a service when the rpm is uninstalled (via before-remove scriptlet). I start the service in after-install, but before-remove then immediately stops it. I have to choose between auto-starting the service after install/upgrade or auto-stopping it after uninstall. It's not straightforward to do both.
If there were an option to specify a scriptlet to run during the %posttrans phase, then the service could be (re)started at that point.