Skip to contentSkip to conversation

populate_sdk_base: fix bashism

PATCH New Laurentiu Palcu 1 participant 2 messages Jul 4, 2013

lore
Share & tools
lore
#0 lore raw

cover populate_sdk_base: fix bashism

The following changes since commit 8a186a6b3853fc1a7dcf342d421c8926c38949c9:

bitbake: hob: save button from settings called a nonexisting method (2013-07-03 08:13:35 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib lpalcu/b4811_printf_issue_in_sh
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=lpalcu/b4811_printf_issue_in_sh

Laurentiu Palcu (1):
populate_sdk_base: fix bashism

 meta/classes/populate_sdk_base.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 populate_sdk_base: fix bashism

Only the printf bash builtin knows about %q format option for escaping spaces. The coreutils version doesn't. Unfortunately, neither dash nor sh have a printf builtin. So, escape the spaces using sed.

[YOCTO #4811]

---
 meta/classes/populate_sdk_base.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/populate_sdk_base.bbclass +1 -1
index 31e848d..6378af9 100644
@@ -181,7 +181,7 @@ else
 	echo "$target_sdk_dir"
 fi
 
-eval target_sdk_dir=$(printf "%q" "$target_sdk_dir")
+eval target_sdk_dir=$(echo "$target_sdk_dir"|sed 's/ /\\ /g')
 if [ -d "$target_sdk_dir" ]; then
 	target_sdk_dir=$(cd "$target_sdk_dir"; pwd)
 else
Signature · 1 line
1.7.9.5