From: Claudius Heine <ch@denx.de>
To: Anton Mikanovich <amikan@ilbers.de>, isar-users@googlegroups.com
Subject: Re: [PATCH 2/2] meta/base.bbclass: integrate COMPATIBLE_MACHINE feature
Date: Thu, 17 Aug 2023 16:45:05 +0200 [thread overview]
Message-ID: <4b7029ee-8bed-46c3-b318-1f8f8473259d@denx.de> (raw)
In-Reply-To: <2c2aabe3-0a93-8389-8822-1a6c58f17ecf@ilbers.de>
Hi Anton,
On 2023-08-17 16:06, Anton Mikanovich wrote:
> 17/08/2023 16:57, Claudius Heine wrote:
>> Integrate the COMPATIBLE_MACHINE of OE, where recipes can specify a
>> regex in COMPATIBLE_MACHINE that needs to match to an entry of the
>> MACHINEOVERRIDES variable, otherwise the recipe will be skipped.
>>
>> Similar to OE, with `PARSE_ALL_RECIPES`, parsing of the recipe can be
>> enforced.
>>
>> This code was copied from the OE-core codebase.
>>
>> Signed-off-by: Claudius Heine <ch@denx.de>
>> ---
>> meta/classes/base.bbclass | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
>> index 17bebe94..68e88390 100644
>> --- a/meta/classes/base.bbclass
>> +++ b/meta/classes/base.bbclass
>> @@ -165,6 +165,16 @@ python() {
>> d.prependVar(
>> e, cleandir_code.format(ws=ws, dirlist="
>> ".join(dirs))
>> )
>> +
>> + need_machine = d.getVar('COMPATIBLE_MACHINE')
>> + if need_machine and not d.getVar('PARSE_ALL_RECIPES', False):
>> + import re
>> + compat_machines = (d.getVar('MACHINEOVERRIDES') or
>> "").split(":")
>> + for m in compat_machines:
>> + if re.match(need_machine, m):
>> + break
>> + else:
>> + raise bb.parse.SkipRecipe("incompatible with machine %s
>> (not in COMPATIBLE_MACHINE)" % d.getVar('MACHINE'))
>> }
>> def isar_export_proxies(d):
>
> Hello Claudius,
> Import re is not needed here because already done at top of the function.
Sure. Do you want a v2 or are you deleting that line on merge?
regards,
Claudius
>
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de
next prev parent reply other threads:[~2023-08-17 14:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-17 13:57 [PATCH 0/2] Integrate compatibiliy systems Claudius Heine
2023-08-17 13:57 ` [PATCH 1/2] meta/bitbake.conf: add MACHINEOVERRIDES and DISTROOVERRIDES Claudius Heine
2023-08-17 13:57 ` [PATCH 2/2] meta/base.bbclass: integrate COMPATIBLE_MACHINE feature Claudius Heine
2023-08-17 14:06 ` Anton Mikanovich
2023-08-17 14:45 ` Claudius Heine [this message]
2023-08-17 14:49 ` Anton Mikanovich
2023-08-23 7:53 ` Uladzimir Bely
2023-08-17 14:09 ` [PATCH 0/2] Integrate compatibiliy systems Anton Mikanovich
2023-08-17 14:48 ` Baurzhan Ismagulov
2023-08-17 15:00 ` Claudius Heine
2023-08-17 15:05 ` Baurzhan Ismagulov
2023-08-24 15:15 ` Uladzimir Bely
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=4b7029ee-8bed-46c3-b318-1f8f8473259d@denx.de \
--to=ch@denx.de \
--cc=amikan@ilbers.de \
--cc=isar-users@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox