From 466b2c30f31754a7b6a2478e359f687ec6888e0d Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Mon, 10 Oct 2016 11:48:03 -0700 Subject: bitbake-user-manual: Updated the datastore functions Fixes [YOCTO #10400] No information existed for cases when a variable did not exist. I added this information to each of the variables in the table. Signed-off-by: Scott Rifenbark --- .../bitbake-user-manual-metadata.xml | 44 ++++++++++++++++------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml index 53e182ba6..40f4829e6 100644 --- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml +++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml @@ -2317,7 +2317,8 @@ d.getVar("X", expand) Returns the value of variable "X". - Using "expand=True" expands the value. + Using "expand=True" expands the value. + Returns "None" if the variable "X" does not exist. d.setVar("X", "value") @@ -2325,24 +2326,32 @@ d.appendVar("X", "value") - Adds "value" to the end of the variable "X". + Adds "value" to the end of the variable "X". + Acts like d.setVar("X", "value") + if the variable "X" does not exist. d.prependVar("X", "value") - Adds "value" to the start of the variable "X". + Adds "value" to the start of the variable "X". + Acts like d.setVar("X", "value") + if the variable "X" does not exist. d.delVar("X") - Deletes the variable "X" from the datastore. + Deletes the variable "X" from the datastore. + Does nothing if the variable "X" does not exist. d.renameVar("X", "Y") - Renames the variable "X" to "Y". + Renames the variable "X" to "Y". + Does nothing if the variable "X" does not exist. d.getVarFlag("X", flag, expand) Returns the value of variable "X". - Using "expand=True" expands the value. + Using "expand=True" expands the value. + Returns "None" if either the variable "X" or the named flag + does not exist. d.setVarFlag("X", flag, "value") @@ -2351,12 +2360,16 @@ d.appendVarFlag("X", flag, "value") Appends "value" to the named flag on the - variable "X". + variable "X". + Acts like d.setVarFlag("X", flag, "value") + if the named flag does not exist. d.prependVarFlag("X", flag, "value") Prepends "value" to the named flag on - the variable "X". + the variable "X". + Acts like d.setVarFlag("X", flag, "value") + if the named flag does not exist. d.delVarFlag("X", flag) @@ -2372,16 +2385,23 @@ d.getVarFlags("X") - Returns a flagsdict of the flags for - the variable "X". + Returns a flagsdict + of the flags for the variable "X". + Returns "None" if the variable "X" does not exist. d.delVarFlags("X") - Deletes all the flags for the variable "X". + Deletes all the flags for the variable "X". + Does nothing if the variable "X" does not exist. d.expand(expression) - Expands variable references in the specified string expression. + Expands variable references in the specified + string expression. + References to variables that do not exist are left as is. + For example, d.expand("foo ${X}") + expands to the literal string "foo ${X}" if the + variable "X" does not exist. -- cgit 1.2.3-korg