diff options
author | Bill Traynor <wmat@alphatroop.com> | 2013-04-15 21:01:32 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-13 22:00:27 +0000 |
commit | 3f1510d32bd7240216b7afa152f6e078d394e63e (patch) | |
tree | 78a73ac22410592740c1c012ee4fc80606fc3210 /doc/user-manual/user-manual-metadata.xml | |
parent | 313712c8db8c070f16344a357d71bb02a9d3e789 (diff) | |
download | bitbake-3f1510d32bd7240216b7afa152f6e078d394e63e.tar.gz |
user-manual-metadata: Seeding the data store access section.
Added the information on how to access the variables and the
data store from Python. Still in draft though.
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Diffstat (limited to 'doc/user-manual/user-manual-metadata.xml')
-rw-r--r-- | doc/user-manual/user-manual-metadata.xml | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/doc/user-manual/user-manual-metadata.xml b/doc/user-manual/user-manual-metadata.xml index d2d20fe7a..99bbf4952 100644 --- a/doc/user-manual/user-manual-metadata.xml +++ b/doc/user-manual/user-manual-metadata.xml @@ -846,7 +846,93 @@ need to import them.</para> </para> </section> </section> + +<section> + <title>Accessing Variable and the Data Store from Python</title> + + <para> + <emphasis>NOTE: This section is in draft.</emphasis> + It is often necessary to manipulate variables within python functions + and the Bitbake data store has an API which allows this. + The operations available are: + + <screen> + d.getVar("X", expand=False) + </screen> + + returns the value of variable "X", expanding the value if specified + + <screen> + d.setVar("X", value) + </screen> + + sets the value of "X" to value + + <screen> + d.appendVar("X", value) + </screen> + + adds value to the end of variable X + + <screen> + d.prependVar("X", value) + </screen> + + adds value to the start of variable X + + <screen> + d.delVar("X") + </screen> + + deletes the variable X from the data store + + <screen> + d.renameVar("X", "Y") + </screen> + + renames variable X to Y + + <screen> + d.getVarFlag("X", flag, expand=False) + </screen> + + <screen> + d.setVarFlag("X", flag, value) + </screen> + + <screen> + d.appendVarFlag("X", flag, value) + </screen> + + <screen> + d.prependVarFlag("X", flag, value) + </screen> + + <screen> + d.delVarFlag("X", flag) + </screen> + + <screen> + d.setVarFlags("X", flagsdict) + </screen> + + sets the flags specified in the dict() parameter + + <screen> + d.getVarFlags("X") + </screen> + + returns a dict of the flags for X + + <screen> + d.delVarFlags + </screen> + + deletes all the flags for a variable + </para> +</section> + <section> <title>Task Checksums and Setscene</title> |