All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel] more nitpickery: difference between d.getVar() and d.expand()?
Date: Tue, 19 May 2020 11:58:44 +0100	[thread overview]
Message-ID: <2bad5b8490f2b1e2aad09127fb1ed2d8efeb7438.camel@linuxfoundation.org> (raw)
In-Reply-To: <alpine.LFD.2.21.2005050921570.14090@localhost.localdomain>

On Tue, 2020-05-05 at 09:27 -0400, Robert P. J. Day wrote:
>   no, wait, hear me out :-). still crawling through BB user manual,
> section 3.5.2, talks about using d.getVar("X") "or for more
> complicated expressions, use d.expand()".
> 
>   fair enough, but it seems like a lot of the code bounces back and
> forth when getting the value of a simple variable, as in:
> 
>   libdir = d.getVar("libdir")
>   libdir = d.expand("${libdir}")
> 
> given that d.getVar() by default expands the value, is there some
> difference between the two statements above when specifically
> accessing a single variable in the data dictionary?

No, there is no difference. I'd usually suggest getVar for a single
variable and expand for an expression.

Cheers,

Richard


      reply	other threads:[~2020-05-19 10:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 13:27 more nitpickery: difference between d.getVar() and d.expand()? Robert P. J. Day
2020-05-19 10:58 ` Richard Purdie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2bad5b8490f2b1e2aad09127fb1ed2d8efeb7438.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.