]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
build.py: add single-quotes around already-expanded directory name
authorPeter Seebach <peter.seebach@windriver.com>
Wed, 20 Nov 2013 00:31:39 +0000 (18:31 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 20 Nov 2013 14:04:47 +0000 (14:04 +0000)
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 <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/build.py

index f9aca42b37764acd7cf68f342c3ed4ffc0d32fbd..92c45a38c90fce9a9064792607ce813b876d696e 100644 (file)
@@ -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)
         script.write('''
 # cleanup