Bug 10400

Summary: Explaining what datastore funcs. do when a variable does not exist
Product: [Documentation] BitBake User Manual Reporter: ulfalizer
Component: bitbake-manualAssignee: Scott Rifenbark <srifenbark>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: kergoth, richard.purdie, ross.burton, srifenbark
Version: 2.2   
Target Milestone: 2.3 M1   
Hardware: x86   
OS: Multiple   
Whiteboard: 11 Oct 2016: RESOLVED
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)

Description ulfalizer 2016-10-07 22:32:45 UTC
Explaining what datastore funcs. do when a variable does not exist

Hello Scott,

Here's some suggested additions to '3.11.1. Functions for Accessing Datastore
Variables' to explain what happens when the variable does not exist:

  * Add this to the d.getVar() description:

      Returns None if the variable "X" does not exist.

  * Add this to the d.appendVar() description:

      Acts like d.setVar("X", "value") if the variable "X" does not exist.

  * Add this to the d.prependVar() description (same as above):

      Acts like d.setVar("X", "value") if the variable "X" does not exist.

  * Add this to the d.delVar() description:

      Does nothing if the variable "X" does not exist.

  * Add this to the d.renameVar() description:

      Does nothing if the variable "X" does not exist.

  * Add this to the d.getVarFlag() description:

      Returns None if either the variable "X" or the named flag does not exist.

  * Add this to the d.appendVarFlag() description:

      Acts like d.setVarFlag("X", flag, "value") if the named flag does not
      exist.

  * Add this to the d.prependVarFlag() description (same as above):

      Acts like d.setVarFlag("X", flag, "value") if the named flag does not
      exist.

  * Add this to the d.getVarFlags() description:

      Returns None if the variable "X" does not exist.

  * Add this to the d.delVarFlags() description:

      Does nothing if the variable "X" does not exist.

  * Add this to the d.expand() description:

      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.


Cheers,
Ulf
Comment 2 ulfalizer 2016-10-11 00:46:17 UTC
Looks good to me.

Thanks,
Ulf
Comment 3 Scott Rifenbark 2016-10-11 13:54:48 UTC
Thanks, 

Setting to RESOLVED and putting the doc flag to "done."

Scott