From: Phil Blundell <philb@gnu.org>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: what is meaning of "SRC_URI_append_whatever +=" ??
Date: Wed, 21 Mar 2012 11:11:11 +0000 [thread overview]
Message-ID: <1332328272.14363.983.camel@phil-desktop> (raw)
In-Reply-To: <alpine.DEB.2.02.1203210625530.16813@oneiric>
On Wed, 2012-03-21 at 06:28 -0400, Robert P. J. Day wrote:
> of course, if all of the above is perfectly valid, i'm going to be
> embarrassed.
All the constructs you mentioned are syntactically valid, though it
isn't clear that all of them are very useful.
There is a subtle difference between SRC_URI_append = "..." and
SRC_URI_append += "..." in that the latter will insert a space whereas
the former will not. But I don't think there is any situation where
this distinction serves any useful purpose. As far as I know, with
current bitbake at least,
SRC_URI = "a"
SRC_URI_append = "b"
SRC_URI_append += "c"
and
SRC_URI = "a"
SRC_URI_append = "b"
SRC_URI_append = " c"
will both produce exactly the same effect, viz. SRC_URI = "ab c". I
think it might have been the case with some older bitbakes that the
middle line would have no effect in this situation but that doesn't
appear to be true now.
> SRC_URI_append = "..." (why not just SRC_URI +=?)
There are two differences in behaviour between these two. First,
trivially, _append doesn't add a space (i.e. it's closer to ".=" than
"+="). Secondly, and more significantly, the effect of _append is
delayed whereas the effect of +=/.= is immediate. So, given:
SRC_URI_append = "b"
SRC_URI = "a"
you will get the result SRC_URI = "ab". Whereas if you had written:
SRC_URI += "b"
SRC_URI = "a"
you would get SRC_URI = "a". There are places in the metadata that rely
on these semantics, though in many ways this is unwholesome behaviour
and it would be nice to eliminate the places where it is used.
p.
next prev parent reply other threads:[~2012-03-21 11:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-21 10:22 what is meaning of "SRC_URI_append_whatever +=" ?? Robert P. J. Day
2012-03-21 10:28 ` Robert P. J. Day
2012-03-21 10:46 ` Koen Kooi
2012-03-21 10:51 ` Graeme Gregory
2012-03-21 11:25 ` Robert P. J. Day
2012-03-21 12:08 ` Richard Purdie
2012-03-21 14:03 ` Chris Larson
2012-03-21 15:05 ` Robert P. J. Day
2012-03-21 11:11 ` Phil Blundell [this message]
2012-03-21 12:11 ` Richard Purdie
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=1332328272.14363.983.camel@phil-desktop \
--to=philb@gnu.org \
--cc=openembedded-core@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox