* [PATCH v2] features_check: warn about nodistro in message
@ 2025-10-29 13:48 Walter Werner SCHNEIDER
2025-11-03 17:18 ` [OE-core] " Ross Burton
0 siblings, 1 reply; 2+ messages in thread
From: Walter Werner SCHNEIDER @ 2025-10-29 13:48 UTC (permalink / raw)
To: openembedded-core
When a required distro feature is missing and DISTRO is set to nodistro,
provide a clear hint to the user. This helps newcomers starting projects
without a DISTRO configured who attempt to build images like
core-image-weston that depend on specific distro features.
Signed-off-by: Walter Werner SCHNEIDER <contact@schnwalter.eu>
---
v1 -> v2: Changed the error message.
As pointed out by others, the message might not be technically correct,
but I think it's good enough for new users, experienced users will know
that they can either update the DISTRO_FEATURES or use a different
DISTRO, new users will start asking question why they have "nodistro"
and wether or not that has something to do with the missing
DISTRO_FEATURES. This is how the error message used to look like:
ERROR: Nothing PROVIDES 'core-image-weston'
core-image-weston was skipped: missing required distro feature 'wayland'
(not in DISTRO_FEATURES)
And now it looks like this:
ERROR: Nothing PROVIDES 'core-image-weston'
core-image-weston was skipped: using DISTRO 'nodistro', which is missing
required DISTRO_FEATURES: 'wayland'
meta/classes-recipe/features_check.bbclass | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/meta/classes-recipe/features_check.bbclass b/meta/classes-recipe/features_check.bbclass
index 1e0eaa4eed..36ed4fa4be 100644
--- a/meta/classes-recipe/features_check.bbclass
+++ b/meta/classes-recipe/features_check.bbclass
@@ -42,8 +42,13 @@ python () {
if required_features:
missing = set.difference(required_features, features)
if missing:
- raise bb.parse.SkipRecipe("missing required %s feature%s '%s' (not in %s_FEATURES)"
- % (kind.lower(), 's' if len(missing) > 1 else '', ' '.join(missing), kind))
+ if kind == 'DISTRO':
+ raise bb.parse.SkipRecipe("using %s '%s', which is missing required %s_FEATURES: '%s'"
+ % (kind, d.getVar(kind), kind, ' '.join(missing)))
+ else:
+ raise bb.parse.SkipRecipe("missing required %s_FEATURES: '%s'"
+ % (kind, ' '.join(missing)))
+
conflict_features = set((d.getVar('CONFLICT_' + kind + '_FEATURES') or '').split())
if conflict_features:
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [OE-core] [PATCH v2] features_check: warn about nodistro in message
2025-10-29 13:48 [PATCH v2] features_check: warn about nodistro in message Walter Werner SCHNEIDER
@ 2025-11-03 17:18 ` Ross Burton
0 siblings, 0 replies; 2+ messages in thread
From: Ross Burton @ 2025-11-03 17:18 UTC (permalink / raw)
To: contact@schnwalter.eu; +Cc: openembedded-core@lists.openembedded.org
Hi Walter,
Can you rewrite the commit message to reflect what the new code does?
Cheers,
Ross
> On 29 Oct 2025, at 13:48, Walter Werner SCHNEIDER via lists.openembedded.org <contact=schnwalter.eu@lists.openembedded.org> wrote:
>
> When a required distro feature is missing and DISTRO is set to nodistro,
> provide a clear hint to the user. This helps newcomers starting projects
> without a DISTRO configured who attempt to build images like
> core-image-weston that depend on specific distro features.
>
> Signed-off-by: Walter Werner SCHNEIDER <contact@schnwalter.eu>
> ---
> v1 -> v2: Changed the error message.
>
> As pointed out by others, the message might not be technically correct,
> but I think it's good enough for new users, experienced users will know
> that they can either update the DISTRO_FEATURES or use a different
> DISTRO, new users will start asking question why they have "nodistro"
> and wether or not that has something to do with the missing
> DISTRO_FEATURES. This is how the error message used to look like:
>
> ERROR: Nothing PROVIDES 'core-image-weston'
> core-image-weston was skipped: missing required distro feature 'wayland'
> (not in DISTRO_FEATURES)
>
> And now it looks like this:
>
> ERROR: Nothing PROVIDES 'core-image-weston'
> core-image-weston was skipped: using DISTRO 'nodistro', which is missing
> required DISTRO_FEATURES: 'wayland'
>
>
>
> meta/classes-recipe/features_check.bbclass | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes-recipe/features_check.bbclass b/meta/classes-recipe/features_check.bbclass
> index 1e0eaa4eed..36ed4fa4be 100644
> --- a/meta/classes-recipe/features_check.bbclass
> +++ b/meta/classes-recipe/features_check.bbclass
> @@ -42,8 +42,13 @@ python () {
> if required_features:
> missing = set.difference(required_features, features)
> if missing:
> - raise bb.parse.SkipRecipe("missing required %s feature%s '%s' (not in %s_FEATURES)"
> - % (kind.lower(), 's' if len(missing) > 1 else '', ' '.join(missing), kind))
> + if kind == 'DISTRO':
> + raise bb.parse.SkipRecipe("using %s '%s', which is missing required %s_FEATURES: '%s'"
> + % (kind, d.getVar(kind), kind, ' '.join(missing)))
> + else:
> + raise bb.parse.SkipRecipe("missing required %s_FEATURES: '%s'"
> + % (kind, ' '.join(missing)))
> +
>
> conflict_features = set((d.getVar('CONFLICT_' + kind + '_FEATURES') or '').split())
> if conflict_features:
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#225456): https://lists.openembedded.org/g/openembedded-core/message/225456
> Mute This Topic: https://lists.openembedded.org/mt/116012468/6875888
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ross.burton@arm.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-03 17:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-29 13:48 [PATCH v2] features_check: warn about nodistro in message Walter Werner SCHNEIDER
2025-11-03 17:18 ` [OE-core] " Ross Burton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox