* [PATCH 0/3] Implement IMAGE_FEATURES in a general way
@ 2011-08-09 14:40 Chris Larson
2011-08-09 14:40 ` [PATCH 1/3] image: implement IMAGE_FEATURES Chris Larson
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Chris Larson @ 2011-08-09 14:40 UTC (permalink / raw)
To: openembedded-core; +Cc: Chris Larson
From: Chris Larson <chris_larson@mentor.com>
This is a second attempt at this, scrapping the class changes from the previous
request and redoing it in a less invasive way, and breaking up the changes into
3 pieces. This implements IMAGE_FEATURES. IMAGE_FEATURES is analagous to
DISTRO_FEATURES and MACHINE_FEATURES, for root filesystem construction.
Currently, the only supported features are any defined package groups, as used
by the oe.packagegroup python module.
Example usage:
PACKAGE_GROUP_myfeature = "vim iptables"
IMAGE_FEATURES += "myfeature"
This also makes the dev-pkgs and dbg-pkgs features general, and adds a doc-pkgs
feature.
The following changes since commit 866a34dd80228a0c10cbea5d7715e2acd6cea131:
uclibc_0.9.32: Sync mount.h from eglibc (2011-08-09 15:17:45 +0100)
are available in the git repository at:
git://github.com/kergoth/oe-core feature/image_features
go here for github's branch comparison interface:
https://github.com/kergoth/oe-core/compare/master...feature%2Fimage_features
Chris Larson (3):
image: implement IMAGE_FEATURES
image: add support for generally useful {dev,doc,dbg}-pkgs features
core-image: adjust to use the new IMAGE_FEATURES support
meta/classes/core-image.bbclass | 77 +++++++++------------------------------
meta/classes/image.bbclass | 47 ++++++++++++++++++++++--
2 files changed, 61 insertions(+), 63 deletions(-)
--
1.7.4.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] image: implement IMAGE_FEATURES
2011-08-09 14:40 [PATCH 0/3] Implement IMAGE_FEATURES in a general way Chris Larson
@ 2011-08-09 14:40 ` Chris Larson
2011-08-09 14:40 ` [PATCH 2/3] image: add support for generally useful {dev, doc, dbg}-pkgs features Chris Larson
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Chris Larson @ 2011-08-09 14:40 UTC (permalink / raw)
To: openembedded-core; +Cc: Chris Larson
From: Chris Larson <chris_larson@mentor.com>
IMAGE_FEATURES is analagous to DISTRO_FEATURES and MACHINE_FEATURES, for
root filesystem construction. Currently, the only supported features are
any defined package groups, as used by the oe.packagegroup python
module.
Example usage:
PACKAGE_GROUP_myfeature = "vim iptables"
IMAGE_FEATURES += "myfeature"
Signed-off-by: Chris Larson <chris_larson@mentor.com>
---
meta/classes/image.bbclass | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 243baa9..e057329 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -6,15 +6,26 @@ inherit imagetest-${IMAGETEST}
LICENSE = "MIT"
PACKAGES = ""
MULTILIB_IMAGE_INSTALL ?= ""
-RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${MULTILIB_IMAGE_INSTALL}"
+RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${MULTILIB_IMAGE_INSTALL} ${FEATURE_INSTALL}"
+RRECOMMENDS += "${FEATURE_INSTALL_OPTIONAL}"
INHIBIT_DEFAULT_DEPS = "1"
+# IMAGE_FEATURES may contain any available package group
+IMAGE_FEATURES ?= ""
+IMAGE_FEATURES[type] = "list"
+
+# packages to install from features
+FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
+FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
+
# "export IMAGE_BASENAME" not supported at this time
+IMAGE_INSTALL ?= ""
+IMAGE_INSTALL[type] = "list"
IMAGE_BASENAME[export] = "1"
-export PACKAGE_INSTALL ?= "${IMAGE_INSTALL}"
+export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${FEATURE_INSTALL}"
export MULTILIB_PACKAGE_INSTALL ?= "${MULTILIB_IMAGE_INSTALL}"
-PACKAGE_INSTALL_ATTEMPTONLY ?= ""
+PACKAGE_INSTALL_ATTEMPTONLY ?= "${FEATURE_INSTALL_OPTIONAL}"
# Images are generally built explicitly, do not need to be part of world.
EXCLUDE_FROM_WORLD = "1"
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] image: add support for generally useful {dev, doc, dbg}-pkgs features
2011-08-09 14:40 [PATCH 0/3] Implement IMAGE_FEATURES in a general way Chris Larson
2011-08-09 14:40 ` [PATCH 1/3] image: implement IMAGE_FEATURES Chris Larson
@ 2011-08-09 14:40 ` Chris Larson
2011-08-09 14:40 ` [PATCH 3/3] core-image: adjust to use the new IMAGE_FEATURES support Chris Larson
2011-08-10 12:25 ` [PATCH 0/3] Implement IMAGE_FEATURES in a general way Richard Purdie
3 siblings, 0 replies; 5+ messages in thread
From: Chris Larson @ 2011-08-09 14:40 UTC (permalink / raw)
To: openembedded-core; +Cc: Chris Larson
From: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
---
meta/classes/image.bbclass | 34 ++++++++++++++++++++++++++++++++--
1 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index e057329..54eb78b 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -6,8 +6,8 @@ inherit imagetest-${IMAGETEST}
LICENSE = "MIT"
PACKAGES = ""
MULTILIB_IMAGE_INSTALL ?= ""
-RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${MULTILIB_IMAGE_INSTALL} ${FEATURE_INSTALL}"
-RRECOMMENDS += "${FEATURE_INSTALL_OPTIONAL}"
+RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${MULTILIB_IMAGE_INSTALL} ${NORMAL_FEATURE_INSTALL}"
+RRECOMMENDS += "${NORMAL_FEATURE_INSTALL_OPTIONAL}"
INHIBIT_DEFAULT_DEPS = "1"
@@ -19,6 +19,36 @@ IMAGE_FEATURES[type] = "list"
FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
+# packages to install from features, excluding dev/dbg/doc
+NORMAL_FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(normal_groups(d), d))}"
+NORMAL_FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(normal_groups(d), d))}"
+
+def normal_groups(d):
+ """Return all the IMAGE_FEATURES, with the exception of our special package groups"""
+ extras = set(['dev-pkgs', 'doc-pkgs', 'dbg-pkgs'])
+ features = set(oe.data.typed_value('IMAGE_FEATURES', d))
+ return features.difference(extras)
+
+def normal_pkgs_to_install(d):
+ import oe.packagedata
+
+ to_install = oe.data.typed_value('IMAGE_INSTALL', d)
+ features = normal_groups(d)
+ required = list(oe.packagegroup.required_packages(features, d))
+ optional = list(oe.packagegroup.optional_packages(features, d))
+ all_packages = to_install + required + optional
+
+ recipes = filter(None, [oe.packagedata.recipename(pkg, d) for pkg in all_packages])
+
+ return all_packages + recipes
+
+PACKAGE_GROUP_dbg-pkgs = "${@' '.join('%s-dbg' % pkg for pkg in normal_pkgs_to_install(d))}"
+PACKAGE_GROUP_dbg-pkgs[optional] = "1"
+PACKAGE_GROUP_dev-pkgs = "${@' '.join('%s-dev' % pkg for pkg in normal_pkgs_to_install(d))}"
+PACKAGE_GROUP_dev-pkgs[optional] = "1"
+PACKAGE_GROUP_doc-pkgs = "${@' '.join('%s-doc' % pkg for pkg in normal_pkgs_to_install(d))}"
+PACKAGE_GROUP_doc-pkgs[optional] = "1"
+
# "export IMAGE_BASENAME" not supported at this time
IMAGE_INSTALL ?= ""
IMAGE_INSTALL[type] = "list"
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] core-image: adjust to use the new IMAGE_FEATURES support
2011-08-09 14:40 [PATCH 0/3] Implement IMAGE_FEATURES in a general way Chris Larson
2011-08-09 14:40 ` [PATCH 1/3] image: implement IMAGE_FEATURES Chris Larson
2011-08-09 14:40 ` [PATCH 2/3] image: add support for generally useful {dev, doc, dbg}-pkgs features Chris Larson
@ 2011-08-09 14:40 ` Chris Larson
2011-08-10 12:25 ` [PATCH 0/3] Implement IMAGE_FEATURES in a general way Richard Purdie
3 siblings, 0 replies; 5+ messages in thread
From: Chris Larson @ 2011-08-09 14:40 UTC (permalink / raw)
To: openembedded-core; +Cc: Chris Larson
From: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
---
meta/classes/core-image.bbclass | 77 +++++++++------------------------------
1 files changed, 17 insertions(+), 60 deletions(-)
diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass
index c8c6a57..507d6a6 100644
--- a/meta/classes/core-image.bbclass
+++ b/meta/classes/core-image.bbclass
@@ -26,73 +26,30 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
# - nfs-server - NFS server (exports / over NFS to everybody)
# - ssh-server-dropbear - SSH server (dropbear)
# - ssh-server-openssh - SSH server (openssh)
-# - dev-pkgs - development packages
-# - dbg-pkgs - debug packages
#
+PACKAGE_GROUP_apps-console-core = "task-core-apps-console"
+PACKAGE_GROUP_x11-base = "task-core-x11-base"
+PACKAGE_GROUP_x11-sato = "task-core-x11-sato"
+PACKAGE_GROUP_x11-netbook = "task-core-x11-netbook"
+PACKAGE_GROUP_apps-x11-core = "task-core-apps-x11-core"
+PACKAGE_GROUP_apps-x11-games = "task-core-apps-x11-games"
+PACKAGE_GROUP_apps-x11-pimlico = "task-core-apps-x11-pimlico"
+PACKAGE_GROUP_tools-debug = "task-core-tools-debug"
+PACKAGE_GROUP_tools-profile = "task-core-tools-profile"
+PACKAGE_GROUP_tools-testapps = "task-core-tools-testapps"
+PACKAGE_GROUP_tools-sdk = "task-core-sdk task-core-standalone-sdk-target"
+PACKAGE_GROUP_nfs-server = "task-core-nfs-server"
+PACKAGE_GROUP_ssh-server-dropbear = "task-core-ssh-dropbear"
+PACKAGE_GROUP_ssh-server-openssh = "task-core-ssh-openssh"
+PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}"
+PACKAGE_GROUP_qt4-pkgs = "task-core-qt-demos"
POKY_BASE_INSTALL = '\
task-core-boot \
task-base-extended \
- ${@base_contains("IMAGE_FEATURES", "dbg-pkgs", "task-core-boot-dbg task-base-dbg", "",d)} \
- ${@base_contains("IMAGE_FEATURES", "dev-pkgs", "task-core-boot-dev task-base-dev", "",d)} \
\
- ${@base_contains("IMAGE_FEATURES", "apps-console-core", "task-core-apps-console", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["apps-console-core", "dbg-pkgs"], "task-core-apps-console-dbg", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["apps-console-core", "dev-pkgs"], "task-core-apps-console-dev", "",d)} \
+ ${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)} \
\
- ${@base_contains("IMAGE_FEATURES", "x11-base", "task-core-x11-base", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["x11-base", "dbg-pkgs"], "task-core-x11-base-dbg", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["x11-base", "dev-pkgs"], "task-core-x11-base-dev", "",d)} \
- \
- ${@base_contains("IMAGE_FEATURES", "x11-sato", "task-core-x11-sato", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["x11-sato", "dbg-pkgs"], "task-core-x11-sato-dbg", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["x11-sato", "dev-pkgs"], "task-core-x11-sato-dev", "",d)} \
- \
- ${@base_contains("IMAGE_FEATURES", "x11-netbook", "task-core-x11-netbook", "", d)} \
- ${@base_contains("IMAGE_FEATURES", ["x11-netbook", "dbg-pkgs"], "task-core-x11-netbook-dbg", "", d)} \
- ${@base_contains("IMAGE_FEATURES", ["x11-netbook", "dev-pkgs"], "task-core-x11-netbook-dev", "", d)} \
- ${@base_contains("IMAGE_FEATURES", "apps-x11-core", "task-core-apps-x11-core", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["apps-x11-core", "dbg-pkgs"], "task-core-apps-x11-core-dbg", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["apps-x11-core", "dev-pkgs"], "task-core-apps-x11-core-dev", "",d)} \
- \
- ${@base_contains("IMAGE_FEATURES", "apps-x11-games", "task-core-apps-x11-games", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["apps-x11-games", "dbg-pkgs"], "task-core-apps-x11-games-dbg", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["apps-x11-games", "dev-pkgs"], "task-core-apps-x11-games-dev", "",d)} \
- \
- ${@base_contains("IMAGE_FEATURES", "apps-x11-pimlico", "task-core-apps-x11-pimlico", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["apps-x11-pimlico", "dbg-pkgs"], "task-core-apps-x11-pimlico-dbg", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["apps-x11-pimlico", "dev-pkgs"], "task-core-apps-x11-pimlico-dev", "",d)} \
- \
- ${@base_contains("IMAGE_FEATURES", "tools-debug", "task-core-tools-debug", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["tools-debug", "dbg-pkgs"], "task-core-tools-debug-dbg", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["tools-debug", "dev-pkgs"], "task-core-tools-debug-dev", "",d)} \
- \
- ${@base_contains("IMAGE_FEATURES", "tools-profile", "task-core-tools-profile", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["tools-profile", "dbg-pkgs"], "task-core-tools-profile-dbg", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["tools-profile", "dev-pkgs"], "task-core-tools-profile-dev", "",d)} \
- \
- ${@base_contains("IMAGE_FEATURES", "tools-testapps", "task-core-tools-testapps", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["tools-testapps", "dbg-pkgs"], "task-core-tools-testapps-dbg", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["tools-testapps", "dev-pkgs"], "task-core-tools-testapps-dev", "",d)} \
- \
- ${@base_contains("IMAGE_FEATURES", "tools-sdk", "task-core-sdk task-core-standalone-sdk-target", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["tools-sdk", "dbg-pkgs"], "task-core-sdk-dbg", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["tools-sdk", "dev-pkgs"], "task-core-sdk-dev", "",d)} \
- \
- ${@base_contains("IMAGE_FEATURES", "nfs-server", "task-core-nfs-server", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["nfs-server", "dbg-pkgs"], "task-core-nfs-server-dbg", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["nfs-server", "dev-pkgs"], "task-core-nfs-server-dev", "",d)} \
- \
- ${@base_contains("IMAGE_FEATURES", "ssh-server-dropbear", "task-core-ssh-dropbear", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["ssh-server-dropbear", "dbg-pkgs"], "task-core-ssh-dropbear-dbg", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["ssh-server-dropbear", "dev-pkgs"], "task-core-ssh-dropbear-dev", "",d)} \
- \
- ${@base_contains("IMAGE_FEATURES", "ssh-server-openssh", "task-core-ssh-openssh", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["ssh-server-openssh", "dbg-pkgs"], "task-core-ssh-openssh-dbg", "",d)} \
- ${@base_contains("IMAGE_FEATURES", ["ssh-server-openssh", "dev-pkgs"], "task-core-ssh-openssh-dev", "",d)} \
- \
- ${@base_contains("IMAGE_FEATURES", "package-management", "${ROOTFS_PKGMANAGE}", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)} \
- ${@base_contains("IMAGE_FEATURES", "qt4-pkgs", "task-core-qt-demos", "",d)} \
${POKY_EXTRA_INSTALL} \
'
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] Implement IMAGE_FEATURES in a general way
2011-08-09 14:40 [PATCH 0/3] Implement IMAGE_FEATURES in a general way Chris Larson
` (2 preceding siblings ...)
2011-08-09 14:40 ` [PATCH 3/3] core-image: adjust to use the new IMAGE_FEATURES support Chris Larson
@ 2011-08-10 12:25 ` Richard Purdie
3 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2011-08-10 12:25 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Chris Larson
On Tue, 2011-08-09 at 07:40 -0700, Chris Larson wrote:
> From: Chris Larson <chris_larson@mentor.com>
>
> This is a second attempt at this, scrapping the class changes from the previous
> request and redoing it in a less invasive way, and breaking up the changes into
> 3 pieces. This implements IMAGE_FEATURES. IMAGE_FEATURES is analagous to
> DISTRO_FEATURES and MACHINE_FEATURES, for root filesystem construction.
> Currently, the only supported features are any defined package groups, as used
> by the oe.packagegroup python module.
>
> Example usage:
>
> PACKAGE_GROUP_myfeature = "vim iptables"
> IMAGE_FEATURES += "myfeature"
>
> This also makes the dev-pkgs and dbg-pkgs features general, and adds a doc-pkgs
> feature.
>
>
> The following changes since commit 866a34dd80228a0c10cbea5d7715e2acd6cea131:
>
> uclibc_0.9.32: Sync mount.h from eglibc (2011-08-09 15:17:45 +0100)
>
> are available in the git repository at:
> git://github.com/kergoth/oe-core feature/image_features
>
> go here for github's branch comparison interface:
> https://github.com/kergoth/oe-core/compare/master...feature%2Fimage_features
>
> Chris Larson (3):
> image: implement IMAGE_FEATURES
> image: add support for generally useful {dev,doc,dbg}-pkgs features
> core-image: adjust to use the new IMAGE_FEATURES support
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-08-10 12:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-09 14:40 [PATCH 0/3] Implement IMAGE_FEATURES in a general way Chris Larson
2011-08-09 14:40 ` [PATCH 1/3] image: implement IMAGE_FEATURES Chris Larson
2011-08-09 14:40 ` [PATCH 2/3] image: add support for generally useful {dev, doc, dbg}-pkgs features Chris Larson
2011-08-09 14:40 ` [PATCH 3/3] core-image: adjust to use the new IMAGE_FEATURES support Chris Larson
2011-08-10 12:25 ` [PATCH 0/3] Implement IMAGE_FEATURES in a general way Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox