Patchwork [bitbake-devel,1/2] add single-quotes around already-expanded directory name

mail settings
Submitter Peter Seebach
Date Nov. 20, 2013, 12:31 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/62003/
State New
Headers show


Peter Seebach - Nov. 20, 2013, 12:31 a.m.
If the computed name of a directory contains an undefined variable
reference, bitbake dutifully creates a directory with a name that has
${...} in it. However, the actual task script created then tries to cd
to that directory, and the cd command fails, because no such directory
exists -- because the shell has helpfully removed the ${...} which did
not match any actual variables.

Since we want the name to be used exactly-as-is, add single quotes around
the name so this doesn't cause strange failures running tasks, which
allows us to progress past such failures and get to a point where they
can be diagnosed.

Signed-off-by: Peter Seebach <>
 lib/bb/ |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/lib/bb/ b/lib/bb/
index f9aca42..92c45a3 100644
--- a/lib/bb/
+++ b/lib/bb/
@@ -288,7 +288,7 @@  set -e
         if bb.msg.loggerVerboseLogs:
             script.write("set -x\n")
         if cwd:
-            script.write("cd %s\n" % cwd)
+            script.write("cd '%s'\n" % cwd)
         script.write("%s\n" % func)
 # cleanup