Bug 10400 - Explaining what datastore funcs. do when a variable does not exist
Summary: Explaining what datastore funcs. do when a variable does not exist
Status: RESOLVED FIXED
Alias: None
Product: BitBake User Manual
Classification: Documentation
Component: bitbake-manual (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Undecided normal
Target Milestone: 2.3 M1
Assignee: Scott Rifenbark
QA Contact:
URL:
Whiteboard: 11 Oct 2016: RESOLVED
Depends on:
Blocks:
 
Reported: 2016-10-07 22:32 UTC by ulfalizer
Modified: 2016-10-11 13:54 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Done (doc changes complete)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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