Patchwork core-image-minimal-initramfs: cause the IMAGE_INSTALL variable to be a limited set

login
register
mail settings
Submitter Saul Wold
Date Feb. 26, 2014, 3:34 p.m.
Message ID <1393428860-11433-1-git-send-email-sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/67485/
State New
Headers show

Comments

Saul Wold - Feb. 26, 2014, 3:34 p.m.
This change causes the IMAGE_INSTALL to be a fixed set of packages
that are know to work and wil not be affected by changes to the
IMAGE_INSTALL variable from the user's local setting.

Since IMAGE_INSTALL is used for all images, but the initramfs needs
to be a well-known sub-set use teh RecipeParsed to finalize it to that
well-known subset.

[YOCTO #5791]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 .../recipes-core/images/core-image-minimal-initramfs.bb | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-core/images/core-image-minimal-initramfs.bb b/meta/recipes-core/images/core-image-minimal-initramfs.bb
index 46a9dc4..68549f7 100644
--- a/meta/recipes-core/images/core-image-minimal-initramfs.bb
+++ b/meta/recipes-core/images/core-image-minimal-initramfs.bb
@@ -3,7 +3,7 @@  DESCRIPTION = "Small image capable of booting a device. The kernel includes \
 the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
 first 'init' program more efficiently."
 
-IMAGE_INSTALL = "initramfs-live-boot initramfs-live-install initramfs-live-install-efi busybox udev base-passwd"
+FIXED_IMAGE_INSTALL = "initramfs-live-boot initramfs-live-install initramfs-live-install-efi busybox udev base-passwd"
 
 # Do not pollute the initrd image with rootfs features
 IMAGE_FEATURES = ""
@@ -19,3 +19,18 @@  inherit core-image
 IMAGE_ROOTFS_SIZE = "8192"
 
 BAD_RECOMMENDATIONS += "busybox-syslog"
+
+python finalize_image_install_handler () {
+    import bb.event
+    if not e.data:
+        return
+
+    if isinstance(e, bb.event.RecipeParsed):
+        image_install = e.data.getVar('FIXED_IMAGE_INSTALL', True)
+        e.data.setVar('IMAGE_INSTALL', image_install)
+
+}
+
+addhandler finalize_image_install_handler
+finalize_image_install_handler[eventmask] = "bb.event.RecipeParsed"
+