summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2013-03-01 15:40:05 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-02 12:57:22 +0000
commit2997653fe373f1b9a938367a2e001dfed7f445f0 (patch)
treecd53d7659ccf4423bdf2be73e122b3cc5e47d4ce /documentation
parentd8e26e2b9f8b622d0cef3d3d1392dd0917343ded (diff)
downloadast2050-yocto-poky-2997653fe373f1b9a938367a2e001dfed7f445f0.zip
ast2050-yocto-poky-2997653fe373f1b9a938367a2e001dfed7f445f0.tar.gz
dev-manual: Added note about BitBake processing brace characters.
Fixes YOCTO #3403 Provided a note at the front of the "Adding a Package" section explaining the exception when using a closed curly brace character inside a shell function with the character at the front of a line with no leading spaces. (From yocto-docs rev: a1c0972083751444a8cc89aa8a026f273d98e23e) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml36
1 files changed, 36 insertions, 0 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 9f8fb33..7d8b849 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -726,6 +726,42 @@
types of packages.
</para>
+ <note>
+ <para>When writing shell functions, you need to be aware of BitBake's
+ curly brace parsing.
+ If a recipe uses a closing curly brace within the function and
+ the character has no leading spaces, BitBake produces a parsing
+ error.
+ If you use a pair of curly brace in a shell function, the
+ closing curly brace must not be located at the start of the line
+ without leading spaces.</para>
+ <para>Here is an example that causes BitBake to produce a parsing
+ error:
+ <literallayout class='monospaced'>
+ fakeroot create_shar() {
+ cat &lt;&lt; "EOF" &gt; ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
+ usage()
+ {
+ echo "test"
+ ###### The following "}" at the start of the line causes a parsing error ######
+ }
+ EOF
+ }
+ </literallayout>
+ Writing the recipe this way avoids the error:
+ <literallayout class='monospaced'>
+ fakeroot create_shar() {
+ cat &lt;&lt; "EOF" &gt; ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
+ usage()
+ {
+ echo "test"
+ ######The following "}" with a leading space at the start of the line avoids the error ######
+ }
+ EOF
+ }
+ </literallayout></para>
+ </note>
+
<section id='usingpoky-extend-addpkg-singlec'>
<title>Single .c File Package (Hello World!)</title>
OpenPOWER on IntegriCloud