On Thu, Feb 20, 2020 at 08:14:04AM +0000, mikko.rap...@bmw.de 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"
> > here
> 
> 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

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.

Also
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).

Cheers,

> -Mikko
> 
> > On Wed, Feb 19, 2020 at 10:48 PM Mikko Rapeli <mikko.rap...@bmw.de> wrote:
> > 
> > > Hi,
> > >
> > > On Wed, Feb 19, 2020 at 01:37:19AM -0800, Armando Hernandez wrote:
> > > > Hello,
> > > >
> > > > I have a recipe that builds a library. The recipe specifies an
> > > additional package "${PN}-systemd" along with other systemd related
> > > variables and finally it instructs that the package should be built with
> > > "-DWITH_SYSTEMD=ON" being passed to cmake. So far so good. But, I extended
> > > this recipe to nativesdk because I need this library on it. When trying to
> > > build the corresponding nativesdk package, the build fails at the
> > > configuration step (i.e. "do_configure") claiming it cannot find the
> > > package systemd.
> > > >
> > > > Is there a way I can install the -already-generated libraries into my
> > > SDK (potentially via the corresponding nativesdk recipe) without having to
> > > rebuild the package? Or do I need to somehow include such systemd package
> > > in my sdk (which I don't think I need at all)?
> > > >
> > > > Any hints and pointers as to were to look at are very well appreciated.
> > > > Thanks.
> > >
> > > Make the systemd dependency for target only, e.g. DEPENDS_class-target +=
> > > "systemd"
> > > etc.
> > >
> > > There may be relevant use cases to build some of systemd components or
> > > tools
> > > to native or nativesdk targets too. In that case add BBCLASSEXTEND +=
> > > "nativesdk" etc
> > > in a bbappend to systemd.
> > >
> > > Hope this helps,
> > >
> > > -Mikko
> > >

Attachment: signature.asc
Description: PGP signature

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#48529): https://lists.yoctoproject.org/g/yocto/message/48529
Mute This Topic: https://lists.yoctoproject.org/mt/71392510/21656
Mute #sdk: https://lists.yoctoproject.org/mk?hashtag=sdk&subid=6691583
Mute #systemd: https://lists.yoctoproject.org/mk?hashtag=systemd&subid=6691583
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to