From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Olof Johansson <olof.johansson@axis.com>
Cc: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: Re: Variable key replaces original warnings
Date: Fri, 31 Jul 2015 16:42:39 +0100 [thread overview]
Message-ID: <1438357359.22462.89.camel@linuxfoundation.org> (raw)
In-Reply-To: <1438343225-sup-6774@axis.com>
On Fri, 2015-07-31 at 13:48 +0200, Olof Johansson wrote:
> Excerpts from Richard Purdie's message of 2015-07-31 12:00:06 +0200:
> > The OE-Core change I made for a similar case was:
> >
> > http://git.yoctoproject.org/cgit.cgi/poky/commit/meta/classes/update-rc.d.bbclass?id=3b627bb28c4ea2ea33050ad4884c6351e2d6ebad
> >
> > i.e. moved to anonymous python. Not ideal, but more explicit.
>
> Ah, thanks. Didn't see this before replying to your other mail. But I
> agree, not ideal at all. It's very surprising. What I would expect is
> that the _append is postponed and only done on the expanded vars, but
> that's not the case? Why not?
Its all about the timing of the override expansion (_append is
effectively an override) and the key expansion. Taking:
PN = A
RRECOMMENDS_${PN} = "X"
UPDATERCPN = "${PN}"
RRECOMMENDS_${UPDATERCPN}_append = "Y"
if you expand overrides first it changes to:
RRECOMMENDS_${PN} = "X"
UPDATERCPN = "${PN}"
RRECOMMENDS_${UPDATERCPN} = "Y"
and it then becomes:
RRECOMMENDS_A = "Y"
however if you do key expansion first it becomes:
RRECOMMENDS_A = "X"
RRECOMMENDS_A_append = "Y"
so RRECOMMENDS_A = "XY"
We're now using the former rather than the latter in bitbake however it
will generate warnings where it sees variables conflict since users tend
not to realise and mean something different.
Worst case we could make the warnings configurable or whitelist them but
simply changing the code not to be ambiguous is likely the best all
around solution.
Cheers,
Richard
next prev parent reply other threads:[~2015-07-31 15:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 15:03 Variable key replaces original warnings Olof Johansson
2015-07-31 9:54 ` Richard Purdie
2015-07-31 10:00 ` Richard Purdie
2015-07-31 11:48 ` Olof Johansson
2015-07-31 15:42 ` Richard Purdie [this message]
2015-07-31 11:42 ` Olof Johansson
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=1438357359.22462.89.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
--cc=olof.johansson@axis.com \
/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.