Himani Ramesh Barde via lists.openembedded.org schrieb am Mi 22. Jul, 06:47 (+0000): > When packages are installed outside of Yocto's normal image creation > (e.g., using multistrap, debootstrap, or dpkg directly on a host), > the postinst script fails to enable systemd services. > > The issue is that the entire enable logic is gated behind > "if type systemctl >/dev/null 2>/dev/null". In cross-install scenarios: > - If systemctl is absent on the host: the check fails, script is skipped > - If host systemctl is present: it cannot find target unit files > > Fix this by separating the offline ($D set) and online ($D unset)
May it be better to say off-side and on-side or image-build and on-target? > code paths into distinct branches. The previous code used a single > OPTS variable to switch between "--root=$D" (offline) and "" (online) > within one unified block. This variable is removed because the two > scenarios now have dedicated branches with different logic: > > - Offline ($D set): Uses "systemctl --root=$D preset" per service, > which reads preset files from the target rootfs and creates symlinks > without needing the host systemctl to understand the target's unit > files. Falls back to "systemctl --root=$D enable" per service. > > - Online ($D unset): Same as before - enable, daemon-reload, preset, > restart. No behavioral change for on-target installs. -- Navimatix GmbH T: 03641 - 327 99 0 Tatzendpromenade 2 F: 03641 - 526 306 07745 Jena www.navimatix.de Geschäftsführer: Steffen Späthe, Jan Rommeley Registergericht: Amtsgericht Jena, HRB 501480
smime.p7s
Description: S/MIME cryptographic signature
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#241635): https://lists.openembedded.org/g/openembedded-core/message/241635 Mute This Topic: https://lists.openembedded.org/mt/120390398/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
