It warns about trailing blanks before the delimiter, as otherwise the
task can't be removed properly

Signed-off-by: Konrad Weihmann <kweihm...@outlook.com>
---
 meta/classes/rootfs-postcommands.bbclass | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meta/classes/rootfs-postcommands.bbclass 
b/meta/classes/rootfs-postcommands.bbclass
index 984730ebe8..e33715f016 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -57,6 +57,14 @@ python () {
     d.appendVar('ROOTFS_POSTPROCESS_COMMAND', 'rootfs_reproducible;')
 }
 
+addhandler rootfs_postcmd_sanity_eventhandler
+rootfs_postcmd_sanity_eventhandler[eventmask] = "bb.event.RecipeParsed"
+python rootfs_postcmd_sanity_eventhandler() {
+    for x in (d.getVar("ROOTFS_POSTPROCESS_COMMAND") or "").split(";"):
+        if x.endswith(" "):
+            bb.warn("'%s' ends with a blank, making the task unremovable" % 
x.strip())
+}
+
 systemd_create_users () {
        for conffile in ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd.conf 
${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd-remote.conf; do
                [ -e $conffile ] || continue
-- 
2.20.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#140418): 
https://lists.openembedded.org/g/openembedded-core/message/140418
Mute This Topic: https://lists.openembedded.org/mt/75374081/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to