[meta-virtualization] xen-guest-image-minimal.bb
Mark Hatle
mark.hatle at windriver.com
Tue Oct 3 08:17:49 PDT 2017
I had a user report to me a problem with this recipe. They received a parsing
error, which was due to effectively a recursion issue.
I looked at the recipe and noticed:
# When xf86-video-vesa is not present, add opengl and don't require wayland:
DISTRO_FEATURES_append = "${@bb.utils.contains('IMAGE_FEATURES', 'x11', \
bb.utils.contains('IMAGE_INSTALL',
'xf86-video-vesa', '', ' opengl', d), '', d)}"
DISTRO_FEATURES_remove = "${@bb.utils.contains('IMAGE_INSTALL',
'xf86-video-vesa', '', 'wayland', d)}"
The trigger for the fault the user sent me was this code.. But I question why
the code is even in the recipe.
DISTRO_FEATURE settings are global, while recipe context is local to that
recipe. So those DISTRO_FEATURES (append and remove) are effectively a no-op to
the rest of the system and would only affect this particular recipe. I believe
that is incorrect.
In addition changing the DISTRO_FEATURE based on the IMAGE_FEATURE is incorrect
-- as often the IMAGE_FEATURES are defined by referencing the DISTRO_FEATURES
(or MACHINE_FEATURES that reference DISTRO_FEATURES) which gets you into a
variable recursion problem.
The design of the DISTRO_FEATURES is that they must be set in a globally loaded
configuration file, so they are visible to all recipes/tasks -- otherwise they
really have no effect.
I'd offer a patch, but I don't understand what is being attempted here.
--Mark
More information about the meta-virtualization
mailing list