* [PATCH 0/2] Validate IMAGE_FEATURES @ 2013-05-09 16:24 Paul Eggleton 2013-05-09 16:24 ` [PATCH 1/2] classes/image: show an error on invalid IMAGE_FEATURES Paul Eggleton 2013-05-09 16:24 ` [PATCH 2/2] classes/core-image: drop apps-console-core IMAGE_FEATURES support Paul Eggleton 0 siblings, 2 replies; 5+ messages in thread From: Paul Eggleton @ 2013-05-09 16:24 UTC (permalink / raw) To: openembedded-core The following changes since commit 2253e9f12734c6e6aa489942b5e4628eca1fa29d: classes/lib: Fix getcmdstatus breakage (2013-05-09 16:05:02 +0100) are available in the git repository at: git://git.openembedded.org/openembedded-core-contrib paule/imagefeatures http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/imagefeatures Paul Eggleton (2): classes/image: show an error on invalid IMAGE_FEATURES classes/core-image: drop apps-console-core IMAGE_FEATURES support meta/classes/core-image.bbclass | 8 -------- meta/classes/image.bbclass | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 8 deletions(-) -- 1.8.1.2 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] classes/image: show an error on invalid IMAGE_FEATURES 2013-05-09 16:24 [PATCH 0/2] Validate IMAGE_FEATURES Paul Eggleton @ 2013-05-09 16:24 ` Paul Eggleton 2013-05-09 22:49 ` Chris Larson 2013-05-09 16:24 ` [PATCH 2/2] classes/core-image: drop apps-console-core IMAGE_FEATURES support Paul Eggleton 1 sibling, 1 reply; 5+ messages in thread From: Paul Eggleton @ 2013-05-09 16:24 UTC (permalink / raw) To: openembedded-core If the user specifies an invalid feature in IMAGE_FEATURES, show an error during parsing. Valid IMAGE_FEATURES are drawn from PACKAGE_GROUP_ definitions, COMPLEMENTARY_GLOBS and a new 'validitems' varflag on IMAGE_FEATURES (so that additional non-package group features can be added elsewhere.) Implements [YOCTO #3308]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> --- meta/classes/image.bbclass | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 251bc9a..2b42e12 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -19,6 +19,7 @@ INHIBIT_DEFAULT_DEPS = "1" # IMAGE_FEATURES may contain any available package group IMAGE_FEATURES ?= "" IMAGE_FEATURES[type] = "list" +IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs" # rootfs bootstrap install ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}" @@ -62,6 +63,19 @@ IMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("IMAGE_FEATURES", d)}' SDKIMAGE_FEATURES ??= "dev-pkgs dbg-pkgs" SDKIMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("SDKIMAGE_FEATURES", d)}' +def check_image_features(d): + valid_features = (d.getVarFlag('IMAGE_FEATURES', 'validitems', True) or "").split() + valid_features += d.getVarFlags('COMPLEMENTARY_GLOB').keys() + for var in d: + if var.startswith("PACKAGE_GROUP_"): + valid_features.append(var[14:]) + valid_features.sort() + + features = set(oe.data.typed_value('IMAGE_FEATURES', d)) + for feature in features: + if feature not in valid_features: + bb.fatal("'%s' in IMAGE_FEATURES is not a valid image feature. Valid features: %s" % (feature, ' '.join(valid_features))) + IMAGE_INSTALL ?= "" IMAGE_INSTALL[type] = "list" export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL} ${FEATURE_INSTALL}" @@ -129,6 +143,8 @@ python () { vendor = localdata.getVar("TARGET_VENDOR_virtclass-multilib-" + eext[1], False) ml_vendor_list += " " + vendor d.setVar('MULTILIB_VENDORS', ml_vendor_list) + + check_image_features(d) } # -- 1.8.1.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] classes/image: show an error on invalid IMAGE_FEATURES 2013-05-09 16:24 ` [PATCH 1/2] classes/image: show an error on invalid IMAGE_FEATURES Paul Eggleton @ 2013-05-09 22:49 ` Chris Larson 2013-05-10 14:19 ` Paul Eggleton 0 siblings, 1 reply; 5+ messages in thread From: Chris Larson @ 2013-05-09 22:49 UTC (permalink / raw) To: Paul Eggleton; +Cc: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 718 bytes --] On Thu, May 9, 2013 at 9:24 AM, Paul Eggleton <paul.eggleton@linux.intel.com > wrote: > If the user specifies an invalid feature in IMAGE_FEATURES, show an > error during parsing. Valid IMAGE_FEATURES are drawn from > PACKAGE_GROUP_ definitions, COMPLEMENTARY_GLOBS and a new 'validitems' > varflag on IMAGE_FEATURES (so that additional non-package group features > can be added elsewhere.) > > Implements [YOCTO #3308]. > > Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> > Hmm, maybe we should add this sort of valid item in a list checking to typecheck.bbclass, or enhance the list type in oe.types to do it there, so we'd have a general mechanism for this. -- Christopher Larson [-- Attachment #2: Type: text/html, Size: 1127 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] classes/image: show an error on invalid IMAGE_FEATURES 2013-05-09 22:49 ` Chris Larson @ 2013-05-10 14:19 ` Paul Eggleton 0 siblings, 0 replies; 5+ messages in thread From: Paul Eggleton @ 2013-05-10 14:19 UTC (permalink / raw) To: openembedded-core; +Cc: Chris Larson On Thursday 09 May 2013 15:49:18 Chris Larson wrote: > On Thu, May 9, 2013 at 9:24 AM, Paul Eggleton <paul.eggleton@linux.intel.com > > wrote: > > > > If the user specifies an invalid feature in IMAGE_FEATURES, show an > > error during parsing. Valid IMAGE_FEATURES are drawn from > > PACKAGE_GROUP_ definitions, COMPLEMENTARY_GLOBS and a new 'validitems' > > varflag on IMAGE_FEATURES (so that additional non-package group features > > can be added elsewhere.) > > > > Implements [YOCTO #3308]. > > > > Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> > > Hmm, maybe we should add this sort of valid item in a list checking to > typecheck.bbclass, or enhance the list type in oe.types to do it there, so > we'd have a general mechanism for this. Good idea, I'll look into this. Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] classes/core-image: drop apps-console-core IMAGE_FEATURES support 2013-05-09 16:24 [PATCH 0/2] Validate IMAGE_FEATURES Paul Eggleton 2013-05-09 16:24 ` [PATCH 1/2] classes/image: show an error on invalid IMAGE_FEATURES Paul Eggleton @ 2013-05-09 16:24 ` Paul Eggleton 1 sibling, 0 replies; 5+ messages in thread From: Paul Eggleton @ 2013-05-09 16:24 UTC (permalink / raw) To: openembedded-core Remove the legacy support for the apps-console-core IMAGE_FEATURES item; we've kept this for a while but it's time for it to go. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> --- meta/classes/core-image.bbclass | 8 -------- 1 file changed, 8 deletions(-) diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass index 86df91d..e7c34e2 100644 --- a/meta/classes/core-image.bbclass +++ b/meta/classes/core-image.bbclass @@ -57,14 +57,6 @@ IMAGE_FEATURES_REPLACES_ssh-server-openssh = "ssh-server-dropbear" MACHINE_HWCODECS ??= "" -python __anonymous() { - # Ensure we still have a splash screen for existing images - if base_contains("IMAGE_FEATURES", "apps-console-core", "1", "", d) == "1": - bb.warn("%s: apps-console-core in IMAGE_FEATURES is no longer supported; adding \"splash\" to enable splash screen" % d.getVar("PN", True)) - d.appendVar("IMAGE_FEATURES", " splash") -} - - CORE_IMAGE_BASE_INSTALL = '\ packagegroup-core-boot \ packagegroup-base-extended \ -- 1.8.1.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-05-10 14:37 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-05-09 16:24 [PATCH 0/2] Validate IMAGE_FEATURES Paul Eggleton 2013-05-09 16:24 ` [PATCH 1/2] classes/image: show an error on invalid IMAGE_FEATURES Paul Eggleton 2013-05-09 22:49 ` Chris Larson 2013-05-10 14:19 ` Paul Eggleton 2013-05-09 16:24 ` [PATCH 2/2] classes/core-image: drop apps-console-core IMAGE_FEATURES support Paul Eggleton
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox