| Submitter | Christopher Larson |
|---|---|
| Date | May 18, 2011, 9:06 p.m. |
| Message ID | <b7564c32452e9ce33d9790465b986471ef5a3cba.1305752660.git.chris_larson@mentor.com> |
| Download | mbox | patch |
| Permalink | /patch/4409/ |
| State | New, archived |
| Headers | show |
Comments
On Wed, 2011-05-18 at 14:06 -0700, Chris Larson wrote: > From: Chris Larson <chris_larson@mentor.com> > > Currently, all image features are assumed to be package groups defined with > oe.packagegroup (PACKAGE_GROUP_<group> = "<list of packages>"). > > Signed-off-by: Chris Larson <chris_larson@mentor.com> > --- > meta/classes/core-image.bbclass | 112 ++++++++++++++------------------------- > meta/classes/image.bbclass | 41 ++++++++++++++- > meta/conf/bitbake.conf | 1 + > 3 files changed, 79 insertions(+), 75 deletions(-) > - SDK > @@ -26,75 +24,43 @@ 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 > # I like the patch, there are just two things which bother me a little. Firstly, if I understand correctly and haven't missed anything, "dev-pkgs" becomes "dev" with this change? A quick grep shows users of this such as: recipes-core/images/core-image-minimal-dev.bb:IMAGE_FEATURES += "dev-pkgs" recipes-extended/images/core-image-lsb-sdk.bb:IMAGE_FEATURES += "apps-console-core tools-debug tools-profile tools-sdk dev-pkgs ssh-server-openssh" recipes-extended/images/core-image-lsb-dev.bb:IMAGE_FEATURES += "apps-console-core dev-pkgs ssh-server-openssh" recipes-sato/images/core-image-sato-dev.bb:IMAGE_FEATURES += "apps-console-core ${SATO_IMAGE_FEATURES} dev-pkgs" recipes-sato/images/core-image-sato-sdk.bb:IMAGE_FEATURES += "apps-console-core ${SATO_IMAGE_FEATURES} tools-debug tools-profile tools-sdk dev-pkgs qt4-pkgs" and I'd expect the changelog to at least mention it and correct this. I'm also thinking IMAGE_FEATURES = "dev" doesn't really indicate what it means very clearly which is why dev-pkgs was originally used... > --- a/meta/classes/image.bbclass > +++ b/meta/classes/image.bbclass > @@ -11,8 +11,45 @@ INHIBIT_DEFAULT_DEPS = "1" > > # "export IMAGE_BASENAME" not supported at this time > IMAGE_BASENAME[export] = "1" > -export PACKAGE_INSTALL ?= "${IMAGE_INSTALL}" > -PACKAGE_INSTALL_ATTEMPTONLY ?= "" > + > +PACKAGE_INSTALL = "${@' '.join(oe.packagegroup.required_packages('${IMAGE_FEATURES}'.split(), d))}" > +PACKAGE_INSTALL_ATTEMPTONLY = "${@' '.join(oe.packagegroup.optional_packages('${IMAGE_FEATURES}'.split(), d))}" > +RDEPENDS += "${@' '.join(oe.packagegroup.active_packages('${IMAGE_FEATURES}'.split(), d))}" I also noticed this patch changes things so PACKAGE_INSTALL_ATTEMPTONLY is used for the dev/doc/dbg packages. I'm not sure its a major issue but it is a change in behaviour and I'd have expected it in the commit message. Cheers, Richard
On Fri, May 20, 2011 at 11:05 AM, Richard Purdie <richard.purdie@linuxfoundation.org> wrote: > On Wed, 2011-05-18 at 14:06 -0700, Chris Larson wrote: >> From: Chris Larson <chris_larson@mentor.com> >> >> Currently, all image features are assumed to be package groups defined with >> oe.packagegroup (PACKAGE_GROUP_<group> = "<list of packages>"). >> >> Signed-off-by: Chris Larson <chris_larson@mentor.com> >> --- >> meta/classes/core-image.bbclass | 112 ++++++++++++++------------------------- >> meta/classes/image.bbclass | 41 ++++++++++++++- >> meta/conf/bitbake.conf | 1 + >> 3 files changed, 79 insertions(+), 75 deletions(-) >> - SDK >> @@ -26,75 +24,43 @@ 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 >> # > > I like the patch, there are just two things which bother me a little. > Firstly, if I understand correctly and haven't missed anything, > "dev-pkgs" becomes "dev" with this change? > > A quick grep shows users of this such as: > > recipes-core/images/core-image-minimal-dev.bb:IMAGE_FEATURES += "dev-pkgs" > recipes-extended/images/core-image-lsb-sdk.bb:IMAGE_FEATURES += "apps-console-core tools-debug tools-profile tools-sdk dev-pkgs ssh-server-openssh" > recipes-extended/images/core-image-lsb-dev.bb:IMAGE_FEATURES += "apps-console-core dev-pkgs ssh-server-openssh" > recipes-sato/images/core-image-sato-dev.bb:IMAGE_FEATURES += "apps-console-core ${SATO_IMAGE_FEATURES} dev-pkgs" > recipes-sato/images/core-image-sato-sdk.bb:IMAGE_FEATURES += "apps-console-core ${SATO_IMAGE_FEATURES} tools-debug tools-profile tools-sdk dev-pkgs qt4-pkgs" > > and I'd expect the changelog to at least mention it and correct this. > > I'm also thinking IMAGE_FEATURES = "dev" doesn't really indicate what it > means very clearly which is why dev-pkgs was originally used... Good points, that's fair enough. I only went with 'dev' for compatibility with upstream OE. I'm not opposed to switching to dev-pkgs. Would you like me to do that and resubmit, with the other issues addressed? >> --- a/meta/classes/image.bbclass >> +++ b/meta/classes/image.bbclass >> @@ -11,8 +11,45 @@ INHIBIT_DEFAULT_DEPS = "1" >> >> # "export IMAGE_BASENAME" not supported at this time >> IMAGE_BASENAME[export] = "1" >> -export PACKAGE_INSTALL ?= "${IMAGE_INSTALL}" >> -PACKAGE_INSTALL_ATTEMPTONLY ?= "" >> + >> +PACKAGE_INSTALL = "${@' '.join(oe.packagegroup.required_packages('${IMAGE_FEATURES}'.split(), d))}" >> +PACKAGE_INSTALL_ATTEMPTONLY = "${@' '.join(oe.packagegroup.optional_packages('${IMAGE_FEATURES}'.split(), d))}" >> +RDEPENDS += "${@' '.join(oe.packagegroup.active_packages('${IMAGE_FEATURES}'.split(), d))}" > > I also noticed this patch changes things so PACKAGE_INSTALL_ATTEMPTONLY > is used for the dev/doc/dbg packages. I'm not sure its a major issue but > it is a change in behaviour and I'd have expected it in the commit > message. Ah, that's my mistake then, I didn't realize the behavior was different in the current implementation. I just figured some packages might not have dev/doc/dbg, so it should be nonfatal to miss them. We may also need to make sure rpm/deb both handle attemptonly properly, as upstream's did not. I'll add this to the commit message, unless you think they shouldn't be optional? I'm inclined to prefer it this way, as, iirc, the depchain stuff uses recommends rather than depends. (though i may be remembering wrong?)
On Fri, 2011-05-20 at 11:09 -0700, Chris Larson wrote: > On Fri, May 20, 2011 at 11:05 AM, Richard Purdie > <richard.purdie@linuxfoundation.org> wrote: > > On Wed, 2011-05-18 at 14:06 -0700, Chris Larson wrote: > >> From: Chris Larson <chris_larson@mentor.com> > >> > >> Currently, all image features are assumed to be package groups defined with > >> oe.packagegroup (PACKAGE_GROUP_<group> = "<list of packages>"). > >> > >> Signed-off-by: Chris Larson <chris_larson@mentor.com> > >> --- > >> meta/classes/core-image.bbclass | 112 ++++++++++++++------------------------- > >> meta/classes/image.bbclass | 41 ++++++++++++++- > >> meta/conf/bitbake.conf | 1 + > >> 3 files changed, 79 insertions(+), 75 deletions(-) > >> - SDK > >> @@ -26,75 +24,43 @@ 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 > >> # > > > > I like the patch, there are just two things which bother me a little. > > Firstly, if I understand correctly and haven't missed anything, > > "dev-pkgs" becomes "dev" with this change? > > > > A quick grep shows users of this such as: > > > > recipes-core/images/core-image-minimal-dev.bb:IMAGE_FEATURES += "dev-pkgs" > > recipes-extended/images/core-image-lsb-sdk.bb:IMAGE_FEATURES += "apps-console-core tools-debug tools-profile tools-sdk dev-pkgs ssh-server-openssh" > > recipes-extended/images/core-image-lsb-dev.bb:IMAGE_FEATURES += "apps-console-core dev-pkgs ssh-server-openssh" > > recipes-sato/images/core-image-sato-dev.bb:IMAGE_FEATURES += "apps-console-core ${SATO_IMAGE_FEATURES} dev-pkgs" > > recipes-sato/images/core-image-sato-sdk.bb:IMAGE_FEATURES += "apps-console-core ${SATO_IMAGE_FEATURES} tools-debug tools-profile tools-sdk dev-pkgs qt4-pkgs" > > > > and I'd expect the changelog to at least mention it and correct this. > > > > I'm also thinking IMAGE_FEATURES = "dev" doesn't really indicate what it > > means very clearly which is why dev-pkgs was originally used... > > Good points, that's fair enough. I only went with 'dev' for > compatibility with upstream OE. I'm not opposed to switching to > dev-pkgs. Would you like me to do that and resubmit, with the other > issues addressed? Yes please :) > >> --- a/meta/classes/image.bbclass > >> +++ b/meta/classes/image.bbclass > >> @@ -11,8 +11,45 @@ INHIBIT_DEFAULT_DEPS = "1" > >> > >> # "export IMAGE_BASENAME" not supported at this time > >> IMAGE_BASENAME[export] = "1" > >> -export PACKAGE_INSTALL ?= "${IMAGE_INSTALL}" > >> -PACKAGE_INSTALL_ATTEMPTONLY ?= "" > >> + > >> +PACKAGE_INSTALL = "${@' '.join(oe.packagegroup.required_packages('${IMAGE_FEATURES}'.split(), d))}" > >> +PACKAGE_INSTALL_ATTEMPTONLY = "${@' '.join(oe.packagegroup.optional_packages('${IMAGE_FEATURES}'.split(), d))}" > >> +RDEPENDS += "${@' '.join(oe.packagegroup.active_packages('${IMAGE_FEATURES}'.split(), d))}" > > > > I also noticed this patch changes things so PACKAGE_INSTALL_ATTEMPTONLY > > is used for the dev/doc/dbg packages. I'm not sure its a major issue but > > it is a change in behaviour and I'd have expected it in the commit > > message. > > Ah, that's my mistake then, I didn't realize the behavior was > different in the current implementation. I just figured some packages > might not have dev/doc/dbg, so it should be nonfatal to miss them. We > may also need to make sure rpm/deb both handle attemptonly properly, > as upstream's did not. I'll add this to the commit message, unless you > think they shouldn't be optional? I'm inclined to prefer it this way, > as, iirc, the depchain stuff uses recommends rather than depends. > (though i may be remembering wrong?) I just checked and all the rootfs package backends have code which looks like it makes that work. I'm fine with the behaviour change as long as we document it. FWIW, I merged the other patches in the series since they were not directly related. Cheers, Richard
On Fri, May 20, 2011 at 11:29 AM, Richard Purdie <richard.purdie@linuxfoundation.org> wrote: > Yes please :) > >> >> --- a/meta/classes/image.bbclass >> >> +++ b/meta/classes/image.bbclass >> >> @@ -11,8 +11,45 @@ INHIBIT_DEFAULT_DEPS = "1" >> >> >> >> # "export IMAGE_BASENAME" not supported at this time >> >> IMAGE_BASENAME[export] = "1" >> >> -export PACKAGE_INSTALL ?= "${IMAGE_INSTALL}" >> >> -PACKAGE_INSTALL_ATTEMPTONLY ?= "" >> >> + >> >> +PACKAGE_INSTALL = "${@' '.join(oe.packagegroup.required_packages('${IMAGE_FEATURES}'.split(), d))}" >> >> +PACKAGE_INSTALL_ATTEMPTONLY = "${@' '.join(oe.packagegroup.optional_packages('${IMAGE_FEATURES}'.split(), d))}" >> >> +RDEPENDS += "${@' '.join(oe.packagegroup.active_packages('${IMAGE_FEATURES}'.split(), d))}" >> > >> > I also noticed this patch changes things so PACKAGE_INSTALL_ATTEMPTONLY >> > is used for the dev/doc/dbg packages. I'm not sure its a major issue but >> > it is a change in behaviour and I'd have expected it in the commit >> > message. >> >> Ah, that's my mistake then, I didn't realize the behavior was >> different in the current implementation. I just figured some packages >> might not have dev/doc/dbg, so it should be nonfatal to miss them. We >> may also need to make sure rpm/deb both handle attemptonly properly, >> as upstream's did not. I'll add this to the commit message, unless you >> think they shouldn't be optional? I'm inclined to prefer it this way, >> as, iirc, the depchain stuff uses recommends rather than depends. >> (though i may be remembering wrong?) > > I just checked and all the rootfs package backends have code which looks > like it makes that work. I'm fine with the behaviour change as long as > we document it. > > FWIW, I merged the other patches in the series since they were not > directly related. Thanks, I'll resend this commit shortly. Aside: can anyone think of a better name than PACKAGE_GROUP for defining named groups of packages? I rather dislike it, but can't think of anything better. PACKAGES is clearly already used, and isn't sufficiently explicit. PACKAGESET or something could work, but I don't know that it's an improvement.. maybe this is best, but I thought I'd ask. I'm terrible at naming just about everything, projects included (*cough* OE *cough*) :)
Patch
diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass index c8c6a57..fcfce71 100644 --- a/meta/classes/core-image.bbclass +++ b/meta/classes/core-image.bbclass @@ -5,18 +5,16 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" -# IMAGE_FEATURES control content of the core reference images -# # By default we install task-core-boot and task-base packages - this gives us # working (console only) rootfs. # -# Available IMAGE_FEATURES: +# Additional IMAGE_FEATURES: # # - apps-console-core -# - x11-base - X11 server + minimal desktop -# - x11-sato - OpenedHand Sato environment -# - x11-netbook - Metacity based environment for netbooks -# - apps-x11-core - X Terminal, file manager, file editor +# - x11-base - X11 server + minimal desktop +# - x11-sato - OpenedHand Sato environment +# - x11-netbook - Metacity based environment for netbooks +# - apps-x11-core - X Terminal, file manager, file editor # - apps-x11-games # - apps-x11-pimlico - OpenedHand Pimlico apps # - tools-sdk - SDK @@ -26,75 +24,43 @@ 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_package-management = "${ROOTFS_PKGMANAGE}" +PACKAGE_GROUP_package-management-bootstrap = "${ROOTFS_PKGMANAGE_BOOTSTRAP}" +PACKAGE_GROUP_qt4-pkgs = "task-core-qt-demos" +PACKAGE_GROUP_ssh-server-dropbear = "task-core-ssh-dropbear" +PACKAGE_GROUP_ssh-server-openssh = "task-core-ssh-openssh" + +python handle_rootfs_pkgmanage_bootstrap() { + if not isinstance(e, bb.event.RecipeParsed): + return + + d = e.data + features = d.getVar('IMAGE_FEATURES', True).split() + if 'package-management' not in features: + features.append('package-management-bootstrap') + d.setVar('IMAGE_FEATURES', ' '.join(features)) +} +addhandler handle_rootfs_pkgmanage_bootstrap + 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", "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} \ - ' + task-core-boot \ + task-base-extended \ + ${POKY_EXTRA_INSTALL} \ + ' POKY_EXTRA_INSTALL ?= "" diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 2469442..3c62688 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -11,8 +11,45 @@ INHIBIT_DEFAULT_DEPS = "1" # "export IMAGE_BASENAME" not supported at this time IMAGE_BASENAME[export] = "1" -export PACKAGE_INSTALL ?= "${IMAGE_INSTALL}" -PACKAGE_INSTALL_ATTEMPTONLY ?= "" + +PACKAGE_INSTALL = "${@' '.join(oe.packagegroup.required_packages('${IMAGE_FEATURES}'.split(), d))}" +PACKAGE_INSTALL_ATTEMPTONLY = "${@' '.join(oe.packagegroup.optional_packages('${IMAGE_FEATURES}'.split(), d))}" +RDEPENDS += "${@' '.join(oe.packagegroup.active_packages('${IMAGE_FEATURES}'.split(), d))}" + + +IMAGE_FEATURES ?= "" +IMAGE_FEATURES[type] = "list" +IMAGE_FEATURES_prepend = "image_base " + +# Define our always included package group +PACKAGE_GROUP_image_base = "${IMAGE_INSTALL}" + +# The following package groups allow one to add debugging, development, and +# documentation files for all packages installed in the image. + +def string_set(iterable): + return ' '.join(set(iterable)) + +def image_features_noextras(d): + for f in d.getVar("IMAGE_FEATURES", True).split(): + if not f in ('dbg', 'dev', 'doc'): + yield f + +def dbg_packages(d): + from itertools import chain + + features = image_features_noextras(d) + return string_set("%s-dbg" % pkg + for pkg in chain(oe.packagegroup.active_packages(features, d), + oe.packagegroup.active_recipes(features, d))) + +PACKAGE_GROUP_dbg = "${@dbg_packages(d)}" +PACKAGE_GROUP_dbg[optional] = "1" +PACKAGE_GROUP_dev = "${@string_set('%s-dev' % pn for pn in oe.packagegroup.active_recipes(image_features_noextras(d), d))}" +PACKAGE_GROUP_dev[optional] = "1" +PACKAGE_GROUP_doc = "${@string_set('%s-doc' % pn for pn in oe.packagegroup.active_recipes(image_features_noextras(d), d))}" +PACKAGE_GROUP_doc[optional] = "1" + # Images are generally built explicitly, do not need to be part of world. EXCLUDE_FROM_WORLD = "1" diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index a0af672..f282960 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -675,6 +675,7 @@ MACHINE_EXTRA_RDEPENDS ?= "" MACHINE_EXTRA_RRECOMMENDS ?= "" MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= "" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= "" +EXTRA_IMAGE_FEATURES ?= "" IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}" COMBINED_FEATURES = "\