From 40ab94036081f9fdc4ebf6126b077149c2a97c31 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Thu, 6 Mar 2014 09:48:37 -0600 Subject: bitbake: user-manual: Review edits applied from Paul Eggleton. Review of the entire manual by Paul. I have implemented his suggestions throughout. (Bitbake rev: 5cd310d1df194cd171691a4bcfb98024e2bc66b8) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- bitbake/doc/user-manual/user-manual-metadata.xml | 87 ++++++++++++++---------- 1 file changed, 51 insertions(+), 36 deletions(-) (limited to 'bitbake/doc/user-manual/user-manual-metadata.xml') diff --git a/bitbake/doc/user-manual/user-manual-metadata.xml b/bitbake/doc/user-manual/user-manual-metadata.xml index 748b959d98..3a19b96303 100644 --- a/bitbake/doc/user-manual/user-manual-metadata.xml +++ b/bitbake/doc/user-manual/user-manual-metadata.xml @@ -40,12 +40,15 @@ BitBake supports variables referencing one another's contents using a syntax that is similar to shell scripting. Following is an example that results in A - containing "aval" and B containing + containing "aval" and B evaluating to "preavalpost". A = "aval" B = "pre${A}post" + Because the expansion happens later, the value of + B expands differently if the value + of A changes. @@ -79,7 +82,7 @@ Setting a weak default value (??=) - It is possible to use a "weaker" assignment that in the + It is possible to use a "weaker" assignment than in the previous section by using the "??=" operator. This assignment behaves identical to "?=" except that the assignment is made at the end of the parsing process rather @@ -197,6 +200,13 @@ override syntax. + + + The operators "_append" and "_prepend" differ from + the operators ".=" and "=." in that they are deferred + until after parsing completes rather than being immediately + applied. +
@@ -519,7 +529,7 @@ recipes require. For example, you can easily abstract out the tasks involved in building a package that uses Autoconf and Automake and put - those tasks into a class file that can be used by your package. + those tasks into a class file that can be used by your recipe. @@ -549,9 +559,10 @@ directive. This directive causes BitBake to parse whatever file you specify, and to insert that file at that location. - The directive is much like Make except that if the path specified - on the include line is a relative path, BitBake locates - the first file it can find within BBPATH. + The directive is much like its equivalent in Make except + that if the path specified on the include line is a relative + path, BitBake locates the first file it can find + within BBPATH. @@ -588,7 +599,7 @@ - Similar to how BitBake uses + Similar to how BitBake handles include, if the path specified on the require line is a relative path, BitBake locates @@ -776,16 +787,17 @@ Tasks are only supported in recipe (.bb or .inc) and class (.bbclass) files. - By convention, tasks begin with the string "do_". + By convention, task names begin with the string "do_". Here is an example of a task that prints out the date: python do_printdate () { - import time print - time.strftime('%Y%m%d', time.gmtime()) + import time + print time.strftime('%Y%m%d', time.gmtime()) } + addtask printdate after do_fetch before do_build @@ -802,8 +814,8 @@ and defining some dependencies: python do_printdate () { - import time print - time.strftime('%Y%m%d', time.gmtime()) + import time + print time.strftime('%Y%m%d', time.gmtime()) } addtask printdate after do_fetch before do_build @@ -942,11 +954,6 @@ BitBake has a defined set of varflags available for recipes and classes. - You can discover the complete set by using grep - within a shell and search on the string "VarFlags". - - - Tasks support a number of these flags which control various functionality of the task: @@ -958,12 +965,13 @@ noexec: Marks the tasks as being empty and no execution required. - These flags are used as dependency placeholders or used when - added tasks need to be subsequently disabled. + The noexec flag can be used to set up + tasks as dependency placeholders, or to disable tasks defined + elsewhere that are not needed in a particular recipe. nostamp: Tells BitBake to not generate a stamp file for a task, - which implies the task is always executed. + which implies the task should always be executed. fakeroot: Causes a task to be run in a fakeroot environment, @@ -1027,7 +1035,7 @@ List of functions to call before the task executes. stamp-extra-info: - Extra stamp information to append to the task's stamp + Extra stamp information to append to the task's stamp. As an example, OpenEmbedded uses this flag to allow machine-specific tasks. @@ -1380,15 +1388,18 @@ d.setVar("X", value) - Sets the variable "X" to "value". + Sets the variable "X" to the value of the Python + variable called "value". d.appendVar("X", value) - Adds "value" to the end of the variable "X". + Adds the value of the Python variable called + "value" to the end of the variable "X". d.prependVar("X", value) - Adds "value" to the start of the variable "X". + Adds the value of the Python variable called + "value" to the start of the variable "X". d.delVar("X") @@ -1400,40 +1411,44 @@ d.getVarFlag("X", flag, expand=False) - Gets "flag" from the variable "X". - Using "expand=True" expands the flag. + Gets then named flag from the variable "X". + Using "expand=True" expands the named flag. d.setVarFlag("X", flag, value) - Sets "flag" for variable "X" to "value". - setVarFlags does not clear previous flags. - Think of this operation as addVarFlags. + Sets the named flag for variable "X" to the value + of the Python variable called "value". d.appendVarFlag("X", flag, value) - Need description. + Appends a value to the named flag on the + variable "X". d.prependVarFlag("X", flag, value) - Need description. + Prepends a value to the named flag on + the variable "X". d.delVarFlag("X", flag) - Need description. + Deletes the named flag on the variable + "X" from the datastore. d.setVarFlags("X", flagsdict) Sets the flags specified in - the dict() parameter. + the flagsdict() parameter. + setVarFlags does not clear previous flags. + Think of this operation as addVarFlags. d.getVarFlags("X") - Returns a dict of the flags for + Returns a flagsdict of the flags for the variable "X". - d.delVarFlags - Deletes all the flags for a variable. + d.delVarFlags("X") + Deletes all the flags for the variable "X". -- cgit v1.2.3-54-g00ecf