diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
index d4f73ae145..dcb1f1e3cf 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
@@ -1228,7 +1228,7 @@
For methods you can use with anonymous Python functions,
see the
- "Accessing Datastore Variables Using Python"
+ "Functions You Can Call From Within Python"
section.
For a different method to run Python code during parsing,
see the
@@ -2082,102 +2082,130 @@
-
- Accessing Datastore Variables Using Python
+
+ Functions You Can Call From Within Python
- It is often necessary to access variables in the
- BitBake datastore using Python functions.
- The Bitbake datastore has an API that allows you this
- access.
- Here is a list of available operations:
+ BitBake provides many functions you can call from
+ within Python functions.
+ This section lists the most commonly used functions,
+ and mentions where to find others.
-
-
-
-
-
-
-
- Operation
- Description
-
-
-
-
- d.getVar("X", expand)
- Returns the value of variable "X".
- Using "expand=True" expands the value.
-
-
- d.setVar("X", "value")
- Sets the variable "X" to "value".
-
-
- d.appendVar("X", "value")
- Adds "value" to the end of the variable "X".
-
-
- d.prependVar("X", "value")
- Adds "value" to the start of the variable "X".
-
-
- d.delVar("X")
- Deletes the variable "X" from the datastore.
-
-
- d.renameVar("X", "Y")
- Renames the variable "X" to "Y".
-
-
- d.getVarFlag("X", flag, expand)
- Returns the value of variable "X".
+
+ Functions for Accessing Datastore Variables
+
+
+ It is often necessary to access variables in the
+ BitBake datastore using Python functions.
+ The Bitbake datastore has an API that allows you this
+ access.
+ Here is a list of available operations:
+
+
+
+
+
+
+
+
+
+ Operation
+ Description
+
+
+
+
+ d.getVar("X", expand)
+ Returns the value of variable "X".
Using "expand=True" expands the value.
-
-
- d.setVarFlag("X", flag, "value")
- Sets the named flag for variable "X" to "value".
-
-
- d.appendVarFlag("X", flag, "value")
- Appends "value" to the named flag on the
- variable "X".
-
-
- d.prependVarFlag("X", flag, "value")
- Prepends "value" to the named flag on
- the variable "X".
-
-
- d.delVarFlag("X", flag)
- Deletes the named flag on the variable
- "X" from the datastore.
-
-
- d.setVarFlags("X", flagsdict)
- Sets the flags specified in
- the flagsdict() parameter.
- setVarFlags does not clear previous flags.
- Think of this operation as addVarFlags.
-
-
- d.getVarFlags("X")
- Returns a flagsdict of the flags for
- the variable "X".
-
-
- d.delVarFlags("X")
- Deletes all the flags for the variable "X".
-
-
- d.expand(expression)
- Expands variable references in the specified string expression.
-
-
-
-
-
+
+
+ d.setVar("X", "value")
+ Sets the variable "X" to "value".
+
+
+ d.appendVar("X", "value")
+ Adds "value" to the end of the variable "X".
+
+
+ d.prependVar("X", "value")
+ Adds "value" to the start of the variable "X".
+
+
+ d.delVar("X")
+ Deletes the variable "X" from the datastore.
+
+
+ d.renameVar("X", "Y")
+ Renames the variable "X" to "Y".
+
+
+ d.getVarFlag("X", flag, expand)
+ Returns the value of variable "X".
+ Using "expand=True" expands the value.
+
+
+ d.setVarFlag("X", flag, "value")
+ Sets the named flag for variable "X" to "value".
+
+
+ d.appendVarFlag("X", flag, "value")
+ Appends "value" to the named flag on the
+ variable "X".
+
+
+ d.prependVarFlag("X", flag, "value")
+ Prepends "value" to the named flag on
+ the variable "X".
+
+
+ d.delVarFlag("X", flag)
+ Deletes the named flag on the variable
+ "X" from the datastore.
+
+
+ d.setVarFlags("X", flagsdict)
+ Sets the flags specified in
+ the flagsdict() parameter.
+ setVarFlags does not clear previous flags.
+ Think of this operation as addVarFlags.
+
+
+ d.getVarFlags("X")
+ Returns a flagsdict of the flags for
+ the variable "X".
+
+
+ d.delVarFlags("X")
+ Deletes all the flags for the variable "X".
+
+
+ d.expand(expression)
+ Expands variable references in the specified string expression.
+
+
+
+
+
+
+
+
+ Other Functions
+
+
+ You can find many other functions that can be called
+ from Python by looking at the source code of the
+ bb module, which is in
+ bitbake/lib/bb.
+ For example,
+ bitbake/lib/bb/utils.py includes
+ the commonly used functions
+ bb.utils.contains() and
+ bb.utils.mkdirhier(), which come
+ with docstrings.
+
+