Due to POSIX shell string parsing limitations we currently can't parse layer names with spaces. Display an error message and bail out when detected.
Signed-off-by: Randolph Sapp <[email protected]> --- oe-layertool-setup.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/oe-layertool-setup.sh b/oe-layertool-setup.sh index 2b05550..16b7844 100755 --- a/oe-layertool-setup.sh +++ b/oe-layertool-setup.sh @@ -211,6 +211,13 @@ parse_repo_line() { then temp_layers="" temp=$(printf '%s\n' "$parsed_layers" | cut -d= -f2) + # sanity check for whitespace in layer names string + if printf '%s\n' "$temp" | grep -q '\s' + then + printf '%s\n' "Whitespace character detected in layer names string!" \ + "This is currently unsupported." ; + exit 1 + fi # use tr to split the layers since we assume layer names don't have # whitespace characters later anyway for x in $(printf '%s\n' "$temp" | tr ':' ' ') -- 2.41.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14621): https://lists.yoctoproject.org/g/meta-arago/message/14621 Mute This Topic: https://lists.yoctoproject.org/mt/99521267/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
