From 69b69193411849de71cf7c81735c3239e28a2940 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 18 Jun 2015 15:14:19 +0100 Subject: bitbake: 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 *` (Bitbake rev: 659ef95c9b8aced3c4ded81c48bcc0fbde4d429f) Signed-off-by: Richard Purdie --- bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml | 4 ++-- bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml | 2 +- bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'bitbake/doc') diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml index 17a74591ac..fa52e29898 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml @@ -287,8 +287,8 @@ PN and PV: - 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'}" In this example, a recipe called "something_1.2.3.bb" would set PN to "something" and diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml index 2fb58e413e..b37b2ae42c 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml @@ -628,7 +628,7 @@ 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("/", "+")}" The fetcher uses the rcleartool or cleartool remote client, depending on diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml index fbffade348..1b9d800108 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml +++ b/bitbake/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: - 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'}" @@ -1163,7 +1163,7 @@ The BB_ORIGENV variable returns a datastore object that can be queried using the standard datastore operators - such as getVar(). + such as getVar(, False). The datastore object is useful, for example, to find the original DISPLAY variable. Here is an example: -- cgit v1.2.3-54-g00ecf