Re: how to reuse generated library in a nativesdk recipe #sdk #systemd

Mikko Rapeli


On Thu, Feb 20, 2020 at 12:55:43PM +0100, Martin Jansa wrote:
On Thu, Feb 20, 2020 at 08:14:04AM +0000, wrote:
On Wed, Feb 19, 2020 at 10:57:41PM +0100, Martin Jansa wrote:
DEPENDS_class-target += "systemd"
You surely meant
DEPENDS_append_class-target = " systemd"
Yes, quite likely. Tough reason why += doesn't work is a mystery to me :)

I hack things until "bitbake -e" shows the right things for the recipes.
I agree it's a bit confusing at first (I was doing the same long time
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
being used

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
to know.

FOO_append += "bar"
is just silly way how to add leading space to the value, one should
always use
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.



Join to automatically receive all group messages.