When opkg is used as package manager and systemd is used as init system there is a problem with restarting systemd service on upgrading. opkg doesn't call prerm script which should stop old service but calls postinst script that starts service. Therefore new service won't start since old one wasn't stopped. Steps to reproduce: 1) Build a systemd based image with opkg package manager. 2) Start image. 3) Build any package that has systemd service (e.g. connman). 4) Copy two packages that was builded (e.g. "connman" and "connman-systemd") from deploy/ipk/<arch> directory into image. 5) Make "opkg install <path to copied packages>/connman*" on image 6) Remove these packages (they do not needed anymore) 7) Increase package revision of connman. 8) Do step 3 - 5. 9) Make "opkg install <path to copied packages>/connman*" on image Expected behavior: In journalctl you have to see a message about stopping and starting connman service. Actual behavior: In journalctl you have to see an *error* message about starting connman service (service wasn't stopped).
Clearly missing behaviour in opkg, but it's also documented missing behaviour in opkg. I guess the postinst should restart, just in case we're running on opkg.
Filed #4232 for the opkg bug, and sent a patch to oe-core which changes postinst to "restart" the service instead of "start".
Fixed in oe-core 319ef0df4ae7ed0372eff90e11244123eccb023c.