On Fri, May 30, 2025 at 01:19:25PM +0200, Alexander Kanavin wrote: > On Wed, 28 May 2025 at 21:47, Patrick Williams wrote: > > > Walnascar is currently broken for template services and so is master. > > My suggestion would be: > > > > - Revert 7a580800db39 in walnascar. > > - Improve systemd_create_presets to handle template services in master. > > - [Maybe] fix all the services failing per Mathieu on master. > > - [Maybe] apply this change so that `systemd_postinst` runs > > as it use to. > > Thanks, I appreciate you digging into the issue. Thank you for the feedback Alex. > That said, the plan to fix it needs to be reordered. We have a strict > policy of fixing issues in master first, for good reason. Also, > backporting the fixes to stable branches is much easier to get > accepted than major reverts like that. Agreed. I tried to do a simple revert locally and it had conflicts already. It was easier to just do the needful in systemd_create_presets. This is done and ready for feedback: https://lore.kernel.org/openembedded-core/20250529174427.2731440-1-patrick@stwcx.xyz/T/#u > Also, if something currently quietly fails in poky-altcfg (it wasn't > entirely clear from your analysis), then the fix shouldn't just > address the issue, it should also make any possible fail a loud and > hard one. So it doesn't quietly regress again. poky-altcfg does not currently fail (or fail to perform). - There are no template instances in any package in poky-altcfg that rely on the use of SYSTEMD_SERVICE. - The only template instance in poky-altcfg is created manually with symlinks (see `systemd-serialgetty.bb:do_install`). This problem only affects template instances: SYSTEMD_SERVICE = "foo@bar.service" # Template instance SYSTEMD_SERVICE = "foo.service" # Non-template instance Prior to 7a580800db39, template instances listed in SYSTEMD_SERVICE would have been enabled by the systemd_postinst hook that called [fake] systemctl. After 7a580800db39, the systemd_postinst hook silently skips. Prior to 7a580800db39, non-template instances listed in SYSTEMD_SERVICE were enabled by systemd_create_presets files (and also duplicatively enabled by systemd_postinst). After 7a580800db39, non-template instances are enabled only by the systemd_create_presets. With my change linked above, the template instances will be enabled by systemd_create_presets as well. Thus all instances (template or not) will be handled by systemd_create_presets, and the systemd_postinst hook only has effect when installing via an RPM and not when building a rootfs. entirely. -- Patrick Williams