[yocto] COMPATIBLE_MACHINE not honored in native extended recipes

Paulo Neves ptsneves at gmail.com
Fri Jan 12 07:14:47 PST 2018


Hello I am having a problem where I want a recipe, along with its
-native version to only be available when allowed by compatible
machine.

In the non native case, COMPATIBLE_MACHINE is correctly honored. But
in the -native version the COMPATIBLE_MACHINE is not honored because
in the native.bbclass there is:

MACHINEOVERRIDES = ""

This change was introduced in d09e6d883042e5d094cd08d829327c4bbbfae135.
While the explanation provided by the commit is accurate for specific
case mentioned it also breaks the COMPATIBLE_MACHINE mechanism which
relies on the MACHINEOVERRIDES variable.

Further evidence that this was not intended is that the exception text is false:

ERROR: Nothing PROVIDES 'x-filter-native'
x-filter-native was skipped: incompatible with machine m1 (not in
COMPATIBLE_MACHINE)

And the x-filter-native'.bb recipe header contains:

COMPATIBLE_MACHINE = "^m1$"


So the exception uses ${MACHINE} to report that a ${MACHINEOVERRIDE}
was not matched with the COMPATIBLE_MACHINE, which is a false
statement.

My solution is very simple and does not break the fix that
d09e6d883042e5d094cd08d829327c4bbbfae135 did:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-COMPATIBLE_MACHINE-for-native-recipe-variants.patch
Type: text/x-patch
Size: 2111 bytes
Desc: not available
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180112/738bdb33/attachment.bin>


More information about the yocto mailing list