On Thu, Feb 20, 2020 at 12:55:43PM +0100, Martin Jansa wrote:
On Thu, Feb 20, 2020 at 08:14:04AM +0000, Mikko.Rapeli@bmw.de wrote:
On Wed, Feb 19, 2020 at 10:57:41PM +0100, Martin Jansa wrote:I agree it's a bit confusing at first (I was doing the same long time
Yes, quite likely. Tough reason why += doesn't work is a mystery to me :)
DEPENDS_class-target += "systemd"You surely meant
DEPENDS_append_class-target = " systemd"
I hack things until "bitbake -e" shows the right things for the recipes.
ago, before bitbake -e was even showing the history of evaluation), but
everybody who uses bitbake often should learn this simple difference:
FOO_append_override = " bar"
is "conditional" append, so it will append "bar" only when "override" is
FOO_override += "bar"
always appends to "FOO_override" and then it overrides whole "FOO" variable
Thanks for this explanation!
There are other more subtle differences like "+=" adds leading space,
_append doesn't and _append is processed later (which is important when
appending to variable set with ?=), but the above difference is a must
FOO_append += "bar"
is just silly way how to add leading space to the value, one should
FOO_append = " bar"
when appending to space separated list (like DEPENDS).
Hmm. I would rather see FOO_append += "bar" being used every time when
spaces are expected. It's way too easy to forget the extra space which causes
annoying and hard to debug issues, and is often missed in reviews too.