All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: joe@deserted.net
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH] bitbake: parse: allow vars_from_file to consider inc files as recipes
Date: Tue, 01 Apr 2014 09:58:31 +0100	[thread overview]
Message-ID: <1396342711.14790.92.camel@ted> (raw)
In-Reply-To: <1396298667-17975-1-git-send-email-joe@deserted.net>

On Mon, 2014-03-31 at 16:44 -0400, joe@deserted.net wrote:
> From: Joe MacDonald <joe@deserted.net>
> 
> A side-effect of making vars_from_file return None for non-recipes is that
> PV gets 'None' if you have an included file named <recipe>.inc.  If there
> is a recipe with a version number in the name for a .inc file, it's
> probably reasonable to calculate PV based on that file, rather than giving
> it 'None' (which becomes 1.0 in most cases).
> 
> Signed-off-by: Joe MacDonald <joe@deserted.net>
> ---
>  bitbake/lib/bb/parse/__init__.py |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> I ran into this when building meta-selinux where there's a chain of includes:
> 
>    refpolicy-mls_2.20130424.bb
>     -> refpolicy_2.20130424.inc
>       -> refpolicy_common.inc

The question to ask here is why is PV being expanded during the .inc
file?

When this code was changed, we did find some issues like this but it
usually means something unexpected was happening and "bad" PV values
were actually being used in some cases. It was therefore a conscious
decision not to do this.

If I take this change, you could get PV of "common" being used in the
second .inc file which is nasty.

I'd therefore much rather figure out what is happening to cause the
expansion of PV in the .inc file and see if we can't avoid that.

Looking at the layer, the issue is:

FILESEXTRAPATHS_prepend := "${THISDIR}/refpolicy-${PV}:"

and I'd suggest that line move to the .bb files in this case.

Cheers,

Richard





  reply	other threads:[~2014-04-01  8:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 20:44 [PATCH] bitbake: parse: allow vars_from_file to consider inc files as recipes joe
2014-04-01  8:58 ` Richard Purdie [this message]
2014-04-01 13:50   ` Joe MacDonald
2014-04-01 13:56     ` Richard Purdie
2014-04-01 14:07       ` Joe MacDonald

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=1396342711.14790.92.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=joe@deserted.net \
    /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.