On Wed, Aug 17, 2016 at 1:35 PM, Kristoffer Grönlund <kgronlund@suse.com> wrote:
The description of the problem is not quite right: We've dropped the hawk package in favor of the hawk2 package (they were co-existing at the same time for a while, but hawk 1 is outdated now). They both provide the hawk systemd service.
So a user upgrading will get moved to the hawk2 package, but if the hawk service was enabled before the upgrade, it is now disabled.
My best guess that this is done by *old* package which is now uninstalled, so it removes and disables services. pre|postun of removed package are executed after pre|post of new package. If this is true, you may try to define triggerpostun in on hawk in hawk2 - this /should/ be executed as last. %pre on hawk2 would then gather current service status and %triggerpostun on hawk in hawk2 would restore it. For reference, execution order for package update is new-%pre for new version of package being installed ... (all new files are installed) new-%post for new version of package being installed any-%triggerin (%triggerin from other packages set off by new install) new-%triggerin old-%triggerun any-%triggerun (%triggerun from other packages set off by old uninstall) old-%preun for old version of package being removed ... (all old files are removed) old-%postun for old version of package being removed old-%triggerpostun any-%triggerpostun (%triggerpostun from other packages set off by old un install) This is not really pure update (we have different packages, still one obsoletes another). Of course this will work only if both are installed/removed in the same transaction. If zypper splits package install and remove between different transactions (and I have strong suspicion it does), all bets are off. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org