From: "Jörg Sommer" <joerg.sommer@navimatix.de>
To: HimaniRamesh.Barde@windriver.com
Cc: openembedded-core@lists.openembedded.org,
Randy.MacLeod@windriver.com, Shiva.Komati@windriver.com
Subject: Re: [OE-core] [PATCH v2] systemd.bbclass: fix service enablement for cross-install scenarios
Date: Wed, 22 Jul 2026 11:49:45 +0200 [thread overview]
Message-ID: <amCPncSGEt6euFYd@navimatix.de> (raw)
In-Reply-To: <20260722064730.3212268-1-HimaniRamesh.Barde@windriver.com>
[-- Attachment #1: Type: text/plain, Size: 1660 bytes --]
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
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 6684 bytes --]
next prev parent reply other threads:[~2026-07-22 9:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 6:15 [PATCH] systemd.bbclass: fix service enablement for cross-install scenarios Himani Ramesh Barde
2026-07-17 18:02 ` [OE-core] " Mathieu Dubois-Briand
2026-07-22 6:47 ` [PATCH v2] " Himani Ramesh Barde
2026-07-22 6:49 ` Barde, Himani Ramesh
2026-07-22 9:49 ` Jörg Sommer [this message]
2026-07-22 10:16 ` [OE-core] " Barde, Himani Ramesh
2026-07-22 10:14 ` [PATCH v3] " Himani Ramesh Barde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=amCPncSGEt6euFYd@navimatix.de \
--to=joerg.sommer@navimatix.de \
--cc=HimaniRamesh.Barde@windriver.com \
--cc=Randy.MacLeod@windriver.com \
--cc=Shiva.Komati@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.