On Tue, Oct 3, 2017 at 8:17 AM, Mark Hatle <[email protected]> wrote: > 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.
Thanks for your analysis and guidance on the expectations and behaviour of the control variables. That code can be removed. The motivation for the change that added that code was to have xen-guest-image-minimal build successfully for both x86 and ARM with common MACHINEs, in configurations with and without x11 selected to be in the image. xf86-video-vesa is only available on x86 builds. The objective of the lines that are modifying the DISTRO_FEATURES contents was to simplify / satisfy the image build requirements for an x11-inclusive image when xf86-video-vesa is not available. However, I must have been confused, and I now see no build difficulties with those lines removed, which fits with your note that any change to DISTRO_FEATURES would only be visible to that one recipe. I'll submit a patch to remove them shortly. Thanks, and apologies for the error. Christopher > > --Mark > -- > _______________________________________________ > meta-virtualization mailing list > [email protected] > https://lists.yoctoproject.org/listinfo/meta-virtualization -- _______________________________________________ meta-virtualization mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-virtualization
