All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@kernel.crashing.org>
To: bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel] [PATCH] cookerdata: Show error for no BBLAYERS in bblayers.conf
Date: Wed, 29 Sep 2021 11:55:41 -0500	[thread overview]
Message-ID: <d183aadd-3904-2faa-238f-ffffd28722f4@kernel.crashing.org> (raw)
In-Reply-To: <b299a244-31f1-30fb-3fe0-3ade94815697@windriver.com>



On 9/27/21 3:58 AM, Changqing Li wrote:
> Hi, Richard
> 
> This patch cause one problem for layerindex.
> 
> function init_parser in
> http://git.yoctoproject.org/cgit.cgi/layerindex-web/tree/layerindex/recipeparse.py, 
> 
> will setup tinfoil in an temp dir without setting BBLAYERS . This patch will
> make layerindex update failed since setup tinfoil failed.

Does the temp dir need this configured?  I believe other parts of the parsing we
do configure things to work with specific default variable definitions.
Defining the branch/release we're looking for seems like the right answer here.

> layerindex setup tinfoil for parsing current target-layer's layer.conf, so don't
> need to set BBLAYERS. 
> 
> Can we revert this or just report as warning?

It really should be a error.  I've ended up accidently doing this before and
it's really painful to debug.

I could see some of the other utilities thought failing here (bitbake-tests or
even bitbake-layers in some cases.)

So I think it's a setup issue within the scope of the layer index parser.  It
might be enough to set the name in a variable in the 'if not classic' case to
simulate a properly configured machine.  (i.e. BBLAYERS = " " or generate a
dummy layer that does nothing and include it.)

--Mark

> Thanks
> 
> Changqing
> 
> ||
> On 9/10/21 10:27 PM, Richard Purdie wrote:
>> [Please note: This e-mail is from an EXTERNAL e-mail address]
>>
>> If there is no BBLAYERS set in bblayers.conf show a more helpful
>> error and exit.
>>
>> [YOCTO #14340]
>>
>> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>> ---
>>  lib/bb/cookerdata.py | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
>> index e54858cf02..d6206b7319 100644
>> --- a/lib/bb/cookerdata.py
>> +++ b/lib/bb/cookerdata.py
>> @@ -342,6 +342,9 @@ class CookerDataBuilder(object):
>>              layers = (data.getVar('BBLAYERS') or "").split()
>>              broken_layers = []
>>
>> +            if not layers:
>> +                bb.fatal("The bblayers.conf file doesn't contain any BBLAYERS definition")
>> +
>>              data = bb.data.createCopy(data)
>>              approved = bb.utils.approved_variables()
>>
>> --
>> 2.32.0
>>
>>
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#12709): https://lists.openembedded.org/g/bitbake-devel/message/12709
> Mute This Topic: https://lists.openembedded.org/mt/85510606/3616948
> Group Owner: bitbake-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [mark.hatle@kernel.crashing.org]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


      reply	other threads:[~2021-09-29 16:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 14:27 [PATCH] cookerdata: Improve missing core layer error message Richard Purdie
2021-09-10 14:27 ` [PATCH] cookerdata: Show error for no BBLAYERS in bblayers.conf Richard Purdie
2021-09-27  8:58   ` [bitbake-devel] " Changqing Li
2021-09-29 16:55     ` Mark Hatle [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=d183aadd-3904-2faa-238f-ffffd28722f4@kernel.crashing.org \
    --to=mark.hatle@kernel.crashing.org \
    --cc=bitbake-devel@lists.openembedded.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.