diff mbox series

[kirkstone,19/21] populate_sdk_ext: Handle spaces within user $PATH

Message ID d2800e00bb4a1d169e0a91b758d3fb2ec5e35f74.1679092796.git.steve@sakoman.com
State Accepted, archived
Commit d2800e00bb4a1d169e0a91b758d3fb2ec5e35f74
Headers show
Series [kirkstone,01/21] pkgconf: fix CVE-2023-24056 | expand

Commit Message

Steve Sakoman March 17, 2023, 10:42 p.m. UTC
From: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>

The script generated by the sdk_ext_postinst function was not quoting
the user existing PATH when updating it causing the export command to

Add necessary double quotes around $PATH.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 00e96bf250eaaded839caf465dbc0af5b604aed7)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
 meta/classes/populate_sdk_ext.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 0fd30478dc..a673af7e7b 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -714,7 +714,7 @@  sdk_ext_postinst() {
 	# A bit of another hack, but we need this in the path only for devtool
 	# so put it at the end of $PATH.
-	echo "export PATH=$target_sdk_dir/sysroots/${SDK_SYS}${bindir_nativesdk}:\$PATH" >> $env_setup_script
+	echo "export PATH=\"$target_sdk_dir/sysroots/${SDK_SYS}${bindir_nativesdk}:\$PATH\"" >> $env_setup_script
 	echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $env_setup_script