All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mikko Rapeli" <mikko.rapeli@bmw.de>
To: <martin.jansa@gmail.com>
Cc: <j.armandohernandez.j@gmail.com>, <yocto@lists.yoctoproject.org>
Subject: Re: [yocto] how to reuse generated library in a nativesdk recipe #sdk #systemd
Date: Thu, 20 Feb 2020 12:01:37 +0000	[thread overview]
Message-ID: <20200220120137.GO104502@korppu> (raw)
In-Reply-To: <20200220115543.2f3hnbia5tytxfeq@jama>

Hi,

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:
> > > > 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

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

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.

Cheers,

-Mikko

      reply	other threads:[~2020-02-20 12:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19  9:37 how to reuse generated library in a nativesdk recipe #sdk #systemd Armando Hernandez
2020-02-19  9:44 ` [yocto] " Mikko Rapeli
     [not found]   ` <CAGpycA+PGsbqnJL1FD8pPNzWK3203RoBTPPD08Vwjn5J9aGMJA@mail.gmail.com>
2020-02-19 15:57     ` Mikko Rapeli
2020-02-19 21:57   ` Martin Jansa
2020-02-20  8:14     ` Mikko Rapeli
2020-02-20 11:55       ` Martin Jansa
2020-02-20 12:01         ` Mikko Rapeli [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=20200220120137.GO104502@korppu \
    --to=mikko.rapeli@bmw.de \
    --cc=j.armandohernandez.j@gmail.com \
    --cc=martin.jansa@gmail.com \
    --cc=yocto@lists.yoctoproject.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.