When a package is removed, all systemd units from the package should be stopped and disabled. But this doesn't apply when the package is upgraded: instead if a unit exists in both the old and new versions, and the unit is running, it should be restarted instead of stopped.
Similarly, if a package is newly installed, the systemd units should be preset; but when it's upgraded, the systemd units shouldn't be preset.
As at now (almost?) all AOSC packages fail t handle those situations 100% correctly, and obviously the logic would be very complicated if we have to write home-brew code for each one. Thus it seems we need some automatic mechanism.
When a package is removed, all systemd units from the package should be stopped and disabled. But this doesn't apply when the package is upgraded: instead if a unit exists in both the old and new versions, and the unit is running, it should be restarted instead of stopped.
Similarly, if a package is newly installed, the systemd units should be preset; but when it's upgraded, the systemd units shouldn't be preset.
As at now (almost?) all AOSC packages fail t handle those situations 100% correctly, and obviously the logic would be very complicated if we have to write home-brew code for each one. Thus it seems we need some automatic mechanism.