diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-18 15:14:19 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-19 22:43:48 +0100 |
commit | 659ef95c9b8aced3c4ded81c48bcc0fbde4d429f (patch) | |
tree | c63666710636bf12d25ef5a491f5d1abbcca4f96 /doc | |
parent | 5ecd6a671c088f270d5f49093f8da83278fc0aa9 (diff) | |
download | bitbake-659ef95c9b8aced3c4ded81c48bcc0fbde4d429f.zip |
bitbake: Add explict getVar param for (non) expansion
Rather than just use d.getVar(X), use the more explict d.getVar(X, False)
since at some point in the future, having the default of expansion would
be nice. This is the first step towards that.
This patch was mostly made using the command:
sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *`
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'doc')
3 files changed, 6 insertions, 6 deletions
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-execution.xml b/doc/bitbake-user-manual/bitbake-user-manual-execution.xml index 17a74591..fa52e298 100644 --- a/doc/bitbake-user-manual/bitbake-user-manual-execution.xml +++ b/doc/bitbake-user-manual/bitbake-user-manual-execution.xml @@ -287,8 +287,8 @@ <link linkend='var-PN'><filename>PN</filename></link> and <link linkend='var-PV'><filename>PV</filename></link>: <literallayout class='monospaced'> - PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'}" - PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1] or '1.0'}" + PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}" + PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}" </literallayout> In this example, a recipe called "something_1.2.3.bb" would set <filename>PN</filename> to "something" and diff --git a/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml b/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml index 2fb58e41..b37b2ae4 100644 --- a/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml +++ b/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml @@ -628,7 +628,7 @@ <literallayout class='monospaced'> SRC_URI = "ccrc://cc.example.org/ccrc;vob=/example_vob;module=/example_module" SRCREV = "EXAMPLE_CLEARCASE_TAG" - PV = "${@d.getVar("SRCREV").replace("/", "+")}" + PV = "${@d.getVar("SRCREV", False).replace("/", "+")}" </literallayout> The fetcher uses the <filename>rcleartool</filename> or <filename>cleartool</filename> remote client, depending on diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml index fbffade3..1b9d8001 100644 --- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml +++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml @@ -327,8 +327,8 @@ The following lines select the values of a package name and its version number, respectively: <literallayout class='monospaced'> - PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'}" - PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1] or '1.0'}" + PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}" + PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}" </literallayout> </para> </section> @@ -1163,7 +1163,7 @@ <para> The <filename>BB_ORIGENV</filename> variable returns a datastore object that can be queried using the standard datastore operators - such as <filename>getVar()</filename>. + such as <filename>getVar(, False)</filename>. The datastore object is useful, for example, to find the original <filename>DISPLAY</filename> variable. Here is an example: |