[PATCH] image-postproc: Revert of gate systemd preset-all on masked unit state (321185dc)

0 views
Skip to first unread message

alexander...@siemens.com

unread,
Aug 6, 2026, 8:32:55 AM (17 hours ago) Aug 6
to isar-...@googlegroups.com, w...@ilbers.de, badrikes...@siemens.com, Alexander Heinisch
From: Alexander Heinisch <alexander...@siemens.com>

Proposed fix in the previous patch 321185dc3ec8be8f2b3a547caf225cebdbd5edf9
tried to resolve an issue caused by a conflict of a preset, explicitly enabling
a masked target, but was fighting symptoms, instead of fixing the root cause.

Proper solution in cases where units are masked is to explicitly disable those in
the system-presets if they were explicitly enabled before. If a masked unit is not
explicitly set to be enabled in the preset no action is needed.

See discussion at: https://groups.google.com/g/isar-users/c/wojTiSSPfG4

Signed-off-by: Alexander Heinisch <alexander...@siemens.com>
---
meta/classes-recipe/rootfs.bbclass | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-recipe/rootfs.bbclass
index bdb9ea7a..2f80ac07 100644
--- a/meta/classes-recipe/rootfs.bbclass
+++ b/meta/classes-recipe/rootfs.bbclass
@@ -605,8 +605,7 @@ image_postprocess_populate_systemd_preset() {
SYSTEMD_INSTALLED=$(dpkg-query --showformat='${db:Status-Status}' --show systemd 2>/dev/null)

if [ "${SYSTEMD_INSTALLED}" = "installed" ]; then
- systemctl list-unit-files --state=masked --no-legend | grep -q '^' \
- || systemctl preset-all --preset-mode="enable-only"
+ systemctl preset-all --preset-mode="enable-only"
fi
EOSH
}
--
2.47.3

Reply all
Reply to author
Forward
0 new messages