summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorDaniel McGregor <daniel.mcgregor@vecima.com>2025-09-23 13:01:46 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-09-25 11:09:04 +0100
commit2423dc098c92c6077d28823c0d6f8ad6bb2ccb6c (patch)
tree747609346442e06dc729c7ca29d82d20c0b424c2 /meta
parent8d89093708a25798cc7ca7562efa33538c9537cc (diff)
downloadpoky-2423dc098c92c6077d28823c0d6f8ad6bb2ccb6c.tar.gz
systemd: use if..then in prerm scriptlet
Using the [ test ] && foo construct in the prerm scriptlet causes the prerm scriptlet to fail if the final test condition fails, which with rpm prevents the removal of the package. Switch to using if;then;fi instead, since it doesn't cause the scriptlet to fail. (From OE-Core rev: a5327fc16b76db28dd1da37463a046e69713dbac) Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes-recipe/systemd.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes-recipe/systemd.bbclass b/meta/classes-recipe/systemd.bbclass
index 4e687135f1..5a0550b287 100644
--- a/meta/classes-recipe/systemd.bbclass
+++ b/meta/classes-recipe/systemd.bbclass
@@ -74,8 +74,9 @@ if type systemctl >/dev/null 2>/dev/null; then
74 fi 74 fi
75 75
76 # same as above, --global flag is not supported for stop so do disable only 76 # same as above, --global flag is not supported for stop so do disable only
77 [ -n "${@systemd_filter_services("${SYSTEMD_SERVICE_ESCAPED}", True, d)}" ] && \ 77 if [ -n "${@systemd_filter_services("${SYSTEMD_SERVICE_ESCAPED}", True, d)}" ]; then
78 systemctl --global disable ${@systemd_filter_services("${SYSTEMD_SERVICE_ESCAPED}", True, d)} 78 systemctl --global disable ${@systemd_filter_services("${SYSTEMD_SERVICE_ESCAPED}", True, d)}
79 fi
79 fi 80 fi
80fi 81fi
81} 82}