All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patrick Ohly <patrick.ohly@intel.com>,
	bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH] cooker.py: allow dangling bbappends if explicitly whitelisted
Date: Fri, 02 Jun 2017 13:58:15 +0100	[thread overview]
Message-ID: <1496408295.6630.95.camel@linuxfoundation.org> (raw)
In-Reply-To: <cf231a157650f22c55ce6861ce824b74b245af55.1495450175.git-series.patrick.ohly@intel.com>

On Mon, 2017-05-22 at 12:50 +0200, Patrick Ohly wrote:
> Having a .bbappend without corresponding .bb file triggers an error
> or
> at least warning, depending on the global
> BB_DANGLINGAPPENDS_WARNONLY.
> 
> Some layers (for example, meta-freescale) avoid that message by only
> adding .bbappends to the BBFILES when the layers they apply to are
> present. Others (like intel-iot-refkit) avoid such .bbappends by
> falling back to global assignments with _pn-<recipe> as override.
> Both
> is complicated.
> 
> Now the warning code checks BBAPPENDS_DANGLING_WHITELIST and ignores
> all bbappends which match a file pattern in that list. This is an
> easier way to have bbappends which may or may not apply to an
> existing recipe.
> 
> Example usage:
> 
>   # We have recipes-* directories, add to BBFILES
>   BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
> 	${LAYERDIR}/optional-bbappends/recipes-*/*/*.bbappend \
> 	${LAYERDIR}/recipes-*/*/*.bbappend"
> 
>   # Several of our *.bbappends might be for layers that are not
>   # guaranteed to be present. Don't warn or even error out because
>   # of those.
>   BBAPPENDS_DANGLING_WHITELIST += "${LAYERDIR}/optional-
> bbappends/recipes-*/*/*.bbappend"

I've been giving this some thought. The freescale layer approach does
have ordering issues which I don't like. Equally, Chris' comment about
this is also a valid concern. Experience suggests saying the layer
maintainer needs to be careful doesn't work in practise.

I'm wondering if there is a hybrid solution if we extend this syntax a
little, e.g.:

BBFILES_DYNAMIC += "\
    XXXX:${LAYERDIR}/optional-bbappends-XXX/recipes-*/*/*.bbappend
    YYYY:${LAYERDIR}/optional-bbappends-YYY/recipes-*/*/*.bbappend
"

so that the code only applies these BBFILES entries if the layer named
in the first parameter is present?

This would happen at the end of parsing so ordering becomes a moot
point. The direction you stack BBFILES_DYANMIC in would determin
bbappend application order.

How does that sound to people?

Cheers,

Richard


  parent reply	other threads:[~2017-06-02 12:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-22 10:50 [PATCH] cooker.py: allow dangling bbappends if explicitly whitelisted Patrick Ohly
2017-05-25 15:50 ` Christopher Larson
2017-05-25 20:01   ` Patrick Ohly
2017-05-26 13:56     ` Patrick Ohly
2017-05-30 19:54   ` Mark Hatle
2017-06-02 12:58 ` Richard Purdie [this message]
2017-06-02 13:06   ` Patrick Ohly
2017-06-02 13:26   ` Mark Hatle
2017-06-02 13:42     ` Christopher Larson
2017-06-02 16:14   ` Patrick Ohly
2017-06-02 16:20     ` Mark Hatle
2017-06-07  9:03   ` [PATCH] cookerdata: Add support for BBFILES_DYNAMIC Patrick Ohly

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=1496408295.6630.95.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=patrick.ohly@intel.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.