rootfs-postcommands: Remove spaces before ; in -ROOTFS_..._COMMAND
PATCH RESEND 1/1 rootfs-postcommands: Remove spaces before ; in -ROOTFS_..._COMMAND
With spaces in ROOTFS_POSTPROCESS_COMMAND attempts to remove elements using ROOTFS_POSTPROCESS_COMMAND_remove causes parse failures of the form:
bb.pysh.sherrors.ShellSyntaxError: LexToken(COMMA,';',0,0) followed by:
LexToken(TOKEN,'write_image_test_data',0,0)
LexToken(COMMA,';',0,0)
LexToken(TOKEN,'set_systemd_default_target',0,0)
LexToken(COMMA,';',0,0)
LexToken(TOKEN,'systemd_create_users',0,0)Removing the spaces between the function name and semicolon allows the list to parse correctly.
---
meta/classes/rootfs-postcommands.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
meta/classes/rootfs-postcommands.bbclass +4 -4
@@ -1,6 +1,6 @@ # Zap the root password if debug-tweaks feature is not enabled -ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password ; ",d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password; ",d)}' # Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks or allow-empty-password is enabled ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", "",d)}'
@@ -12,7 +12,7 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'deb ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}' # Create /etc/timestamp during image construction to give a reasonably sane default time setting -ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; " +ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp; " # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'
@@ -26,11 +26,11 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only APPEND_append = '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", " ro", "", d)}' # Generates test data file with data store variables expanded in json format -ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; " +ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data; " # Write manifest IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest" -ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; " +ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest; " # Set default postinst log file POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log" # Set default target for systemd images
Signature · 1 line
2.17.1
Quoted 47 lines · Alex Kiernan
With spaces in
ROOTFS_POSTPROCESS_COMMANDattempts to remove elements usingROOTFS_POSTPROCESS_COMMAND_removecauses parse failures of the form:bb.pysh.sherrors.ShellSyntaxError:
LexToken(COMMA,';',0,0)followed by:LexToken(TOKEN,'write_image_test_data',0,0) LexToken(COMMA,';',0,0) LexToken(TOKEN,'set_systemd_default_target',0,0) LexToken(COMMA,';',0,0) LexToken(TOKEN,'systemd_create_users',0,0)Removing the spaces between the function name and semicolon allows the list to parse correctly.
Signed-off-by Alex Kiernan <[email protected]>---
meta/classes/rootfs-postcommands.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)meta/classes/rootfs-postcommands.bbclass +2
-2@@ -1,6 +1,6 @@ # Zap the root password if debug-tweaks feature is not enabled -ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password ; ",d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password; ",d)}' # Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks or allow-empty-password is enabled ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", "",d)}'@@ -12,7 +12,7 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'deb ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}' # Create /etc/timestamp during image construction to give a reasonably sane default time setting -ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; " +ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp; " # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'@@ -26,11 +26,11 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only APPEND_append = '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", " ro", "", d)}' # Generates test data file with data store variables expanded in json format
meta/classes/rootfs-postcommands.bbclass ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only · line 36
Quoted 10 lines
meta/classes/rootfs-postcommands.bbclass +2
-2-ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; " +ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data; " # Write manifest IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest" -ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; " +ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest; " # Set default postinst log file POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log" # Set default target for systemd images
Ping?
Signature · 1 line
Alex Kiernan
Quoted 12 lines · Alex Kiernan
With spaces in
ROOTFS_POSTPROCESS_COMMANDattempts to remove elements usingROOTFS_POSTPROCESS_COMMAND_removecauses parse failures of the form:bb.pysh.sherrors.ShellSyntaxError:
LexToken(COMMA,';',0,0)followed by:LexToken(TOKEN,'write_image_test_data',0,0) LexToken(COMMA,';',0,0) LexToken(TOKEN,'set_systemd_default_target',0,0) LexToken(COMMA,';',0,0) LexToken(TOKEN,'systemd_create_users',0,0)
Quoted 8 lines
Removing the spaces between the function name and semicolon allows the list to parse correctly.
Signed-off-by Alex Kiernan <[email protected]>---
meta/classes/rootfs-postcommands.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
This does sound like you're working around a bug in shlex :/
Cheers,
Richard
Quoted 17 lines · Richard Purdie
Quoted 15 lines · Alex Kiernan
With spaces in
ROOTFS_POSTPROCESS_COMMANDattempts to remove elements usingROOTFS_POSTPROCESS_COMMAND_removecauses parse failures of the form:bb.pysh.sherrors.ShellSyntaxError:
LexToken(COMMA,';',0,0)followed by:LexToken(TOKEN,'write_image_test_data',0,0) LexToken(COMMA,';',0,0) LexToken(TOKEN,'set_systemd_default_target',0,0) LexToken(COMMA,';',0,0) LexToken(TOKEN,'systemd_create_users',0,0)Removing the spaces between the function name and semicolon allows the list to parse correctly.
Quoted 8 lines
Quoted 5 lines
Signed-off-by Alex Kiernan <[email protected]>---
meta/classes/rootfs-postcommands.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)This does sound like you're working around a bug in shlex :/
Yeah, sorry...
I'll see if I can go and have a proper look at the underlying problem!
Signature · 1 line
Alex Kiernan