All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] toolchain-scripts.bbclass: use double quotes for exported PS1
@ 2022-02-07  7:38 kai.kang
  0 siblings, 0 replies; only message in thread
From: kai.kang @ 2022-02-07  7:38 UTC (permalink / raw)
  To: openembedded-core; +Cc: Kai Kang

From: Kai Kang <kai.kang@windriver.com>

Use double quotes("") rather than single quotes('') for PS1 in
EXPORT_SDK_PS1 which will be exported in SDK environment file. Then it
could set PS1 for SDK env with some variables in host env, such as the
original PS1. The SDK PS1 could be some distinct words plus original PS1
rather than replace the whole original PS1. For example, it could set in
local.conf with

SDK_PS1 = "(oesdk) \${PS1}"

then it just prepends '(oesdk) ' before original PS1 after source the
SDK environment file.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/classes/toolchain-scripts.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index fb6261c91d..8f914cce27 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -8,7 +8,7 @@ TARGET_CC_ARCH:append:libc-musl = " -mmusl"
 # default debug prefix map isn't valid in the SDK
 DEBUG_PREFIX_MAP = ""
 
-EXPORT_SDK_PS1 = "${@ 'export PS1=\'%s\'' % d.getVar('SDK_PS1') if d.getVar('SDK_PS1') else ''}"
+EXPORT_SDK_PS1 = "${@ 'export PS1=\\"%s\\"' % d.getVar('SDK_PS1') if d.getVar('SDK_PS1') else ''}"
 
 # This function creates an environment-setup-script for use in a deployable SDK
 toolchain_create_sdk_env_script () {
-- 
2.33.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-07  7:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-07  7:38 [PATCH] toolchain-scripts.bbclass: use double quotes for exported PS1 kai.kang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.