Bug 13689

Summary: vim incorrectly requires gtk3 when not including x11 in an image
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: anon2313
Component: meta-yoctoAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Undecided CC: poky.bs.watcher, poky.watcher, ross.burton
Version: unspecified   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description anon2313 2019-12-06 14:07:03 UTC
The vim.inc file checks to see if the DISTRO_FEATURES contains x11 and if so enables x11 and gtkgui as part of PACKAGECONFIG.

A distribution can feature x11 but be building a command line only image such as core-image-full-cmdline. When including vim in such an image it then pulls in xt and gtk3.

This probably should be checking IMAGE_FEATURES.
Comment 1 Ross Burton 2019-12-12 15:48:42 UTC
IMAGE_FEATURES won't work, as it doesn't get passed to all of the recipes that go into the image.

If you want to build both a non-graphical vim and a graphical vim then you'll need to have two recipes, or alter the recipe to build a basic vim and a featureful vim.
Comment 2 anon2313 2019-12-20 09:30:52 UTC
Thanks.  I just needed the non-graphical vim.  I was caught by surprise that the final image included vim and gtk+3 libraries when there was no X server.

If IMAGE_FEATURES can't be used then I wonder what is the intended use of IMAGE_FEATURES.
Comment 3 Ross Burton 2019-12-20 10:30:47 UTC
Image features are image-wide controls and don't impact individual recipe building: https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#ref-features-image