[documentation] documentation: remove True option to getVar calls

Submitted by André Draszik on Jan. 15, 2019, 3:02 p.m. | Patch ID: 157927

Details

Message ID 20190115150242.632-1-git@andred.net
State New
Headers show

Commit Message

André Draszik Jan. 15, 2019, 3:02 p.m.
From: André Draszik <andre.draszik@jci.com>

getVar() has been defaulting to expanding by default for
a long time (2016), thus remove the True option from
getVar() examples with a regex search and replace.

Search & replace made using the following command:
    sed -e 's|\(d\.getVar \?\)( \?\([^,()]*\), \?True)|\1(\2)|g' \
        -i $(git grep -E 'getVar ?\( ?([^,()]*), ?True\)' \
             | cut -d':' -f1 \
             | sort -u)

Note that there are are several other examples of getVar()
usage which already don't explicitly add the True option,
this patch just align some stray remainders.

Signed-off-by: André Draszik <andre.draszik@jci.com>
---
 documentation/dev-manual/dev-manual-common-tasks.xml | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index c75e718d67..af0e4d53bf 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -5116,15 +5116,15 @@ 
             So, commands such as the following are useful when exploring the data
             store and running functions:
             <literallayout class='monospaced'>
-     pydevshell> d.getVar("STAGING_DIR", True)
+     pydevshell> d.getVar("STAGING_DIR")
      '/media/build1/poky/build/tmp/sysroots'
-     pydevshell> d.getVar("STAGING_DIR", False)
+     pydevshell> d.getVar("STAGING_DIR")
      '${TMPDIR}/sysroots'
      pydevshell> d.setVar("FOO", "bar")
-     pydevshell> d.getVar("FOO", True)
+     pydevshell> d.getVar("FOO")
      'bar'
      pydevshell> d.delVar("FOO")
-     pydevshell> d.getVar("FOO", True)
+     pydevshell> d.getVar("FOO")
      pydevshell> bb.build.exec_func("do_unpack", d)
      pydevshell>
             </literallayout>
@@ -6892,8 +6892,8 @@ 
             <literallayout class='monospaced'>
      MACHINE = "qemux86-64"
      DEFAULTTUNE = "x86-64-x32"
-     baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) \
-        or 'INVALID'), True) or 'lib'}"
+     baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE') \
+        or 'INVALID')) or 'lib'}"
             </literallayout>
             Once you have set up your configuration file, use BitBake to
             build an image that supports the x32 psABI.

Comments

Scott Rifenbark Jan. 15, 2019, 8:12 p.m.
Hi Andre,

Thanks for the patch.  See
http://www.yoctoproject.org/docs/2.7/dev-manual/dev-manual.html#platdev-appdev-devpyshell
and
http://www.yoctoproject.org/docs/2.7/dev-manual/dev-manual.html#using-x32-psabi
sections for the changes.

Thanks,
Scott Rifenbark



On Tue, Jan 15, 2019 at 7:03 AM André Draszik <git@andred.net> wrote:

> From: André Draszik <andre.draszik@jci.com>
>
> getVar() has been defaulting to expanding by default for
> a long time (2016), thus remove the True option from
> getVar() examples with a regex search and replace.
>
> Search & replace made using the following command:
>     sed -e 's|\(d\.getVar \?\)( \?\([^,()]*\), \?True)|\1(\2)|g' \
>         -i $(git grep -E 'getVar ?\( ?([^,()]*), ?True\)' \
>              | cut -d':' -f1 \
>              | sort -u)
>
> Note that there are are several other examples of getVar()
> usage which already don't explicitly add the True option,
> this patch just align some stray remainders.
>
> Signed-off-by: André Draszik <andre.draszik@jci.com>
> ---
>  documentation/dev-manual/dev-manual-common-tasks.xml | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml
> b/documentation/dev-manual/dev-manual-common-tasks.xml
> index c75e718d67..af0e4d53bf 100644
> --- a/documentation/dev-manual/dev-manual-common-tasks.xml
> +++ b/documentation/dev-manual/dev-manual-common-tasks.xml
> @@ -5116,15 +5116,15 @@
>              So, commands such as the following are useful when exploring
> the data
>              store and running functions:
>              <literallayout class='monospaced'>
> -     pydevshell> d.getVar("STAGING_DIR", True)
> +     pydevshell> d.getVar("STAGING_DIR")
>       '/media/build1/poky/build/tmp/sysroots'
> -     pydevshell> d.getVar("STAGING_DIR", False)
> +     pydevshell> d.getVar("STAGING_DIR")
>       '${TMPDIR}/sysroots'
>       pydevshell> d.setVar("FOO", "bar")
> -     pydevshell> d.getVar("FOO", True)
> +     pydevshell> d.getVar("FOO")
>       'bar'
>       pydevshell> d.delVar("FOO")
> -     pydevshell> d.getVar("FOO", True)
> +     pydevshell> d.getVar("FOO")
>       pydevshell> bb.build.exec_func("do_unpack", d)
>       pydevshell>
>              </literallayout>
> @@ -6892,8 +6892,8 @@
>              <literallayout class='monospaced'>
>       MACHINE = "qemux86-64"
>       DEFAULTTUNE = "x86-64-x32"
> -     baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE',
> True) \
> -        or 'INVALID'), True) or 'lib'}"
> +     baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE') \
> +        or 'INVALID')) or 'lib'}"
>              </literallayout>
>              Once you have set up your configuration file, use BitBake to
>              build an image that supports the x32 psABI.
> --
> 2.20.1
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>