Bug 3308 - Validate IMAGE_FEATURES values
Summary: Validate IMAGE_FEATURES values
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.3
Hardware: All Multiple
: Medium enhancement
Target Milestone: 1.5
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-10-18 17:14 UTC by Paul Eggleton
Modified: 2013-06-20 12:09 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2012-10-18 17:14:07 UTC
It seems to be a common mistake for people to add package names into IMAGE_FEATURES in order to install them into their image. We don't currently validate items added to here so it is not clear to the user that it hasn't worked until they find that nothing changed in the image produced. It would not be hard to validate the values in IMAGE_FEATURES, so I think we should.

I have a very basic patch here to do this already but it needs further testing and cleanup.
Comment 1 Paul Eggleton 2013-06-03 17:14:05 UTC
Implementation merged to master, with a couple of follow-up fixes from Khem and Martin:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=d63c8a1597c9bd0a838cb59ca461ac432b630a90
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=0c8173d7dcd5d3338f6619ad39cb17fc241a8123
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=fb89bb369be0863d7c1175fcf10c4860e547fd9c

As mentioned on the mailing list it would be nice to have list validation like this implemented generically in OE's type support, but that is a separate task.
Comment 2 Stoicescu Cornel 2013-06-20 12:09:46 UTC
Adding IMAGE_FEATURES += " ssh-server-openssh" in local.conf results in an error:

ERROR: 'ssh' in IMAGE_FEATURES is not a valid image feature. Valid features: dbg-pkgs debug-tweaks dev-pkgs doc-pkgs eclipse-debug hwcodecs nfs-server package-management package-management ptest-pkgs qt4-pkgs read-only-rootfs splash ssh-server-dropbear ssh-server-openssh staticdev-pkgs tools-debug tools-profile tools-sdk tools-testapps x11 x11-base x11-sato
ERROR: Unable to parse /home/cornel/SSD/poky/meta/recipes-graphics/images/core-image-x11.bb: Exited with "1"
ERROR: 'ssh' in IMAGE_FEATURES is not a valid image feature. Valid features: dbg-pkgs debug-tweaks dev-pkgs doc-pkgs eclipse-debug hwcodecs nfs-server package-management package-management ptest-pkgs qt4-pkgs read-only-rootfs splash ssh-server-dropbear ssh-server-openssh staticdev-pkgs tools-debug tools-profile tools-sdk tools-testapps x11 x11-base x11-sato
ERROR: 'ssh' in IMAGE_FEATURES is not a valid image feature. Valid features: dbg-pkgs debug-tweaks dev-pkgs doc-pkgs eclipse-debug hwcodecs nfs-server package-management package-management ptest-pkgs qt4-pkgs read-only-rootfs splash ssh-server-dropbear ssh-server-openssh staticdev-pkgs tools-debug tools-profile tools-sdk tools-testapps x11 x11-base x11-sato
ERROR: Command execution failed: Exited with 1

Verified in master:e04e6dab0afa8f72bf001b0cc106cd13b7694a91