]> code.ossystems Code Review - openembedded-core.git/commitdiff
core-image: split debug-tweaks into individual features
authorSaul Wold <sgw@linux.intel.com>
Mon, 2 Feb 2015 22:07:47 +0000 (14:07 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 7 Feb 2015 13:30:57 +0000 (13:30 +0000)
Split the debug-tweaks into a more fine tunable set of IMAGE_FEATURES
which activate the component functions.

Clean-up image-core and image bbclass by having the ROOTFS_POSTPROCESS_COMMANDs
in in one place for the debug-tweaks related functions

[YOCTO #5344]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/core-image.bbclass
meta/classes/image.bbclass

index 62363fb334559d63b2111b48a20e160bae098f3d..a78f93405b8c62909d39ac5b333e36ce05f018fa 100644 (file)
@@ -73,8 +73,5 @@ inherit image
 # Create /etc/timestamp during image construction to give a reasonably sane default time setting
 ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; "
 
-# Zap the root password if debug-tweaks feature is not enabled
-ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "", "zap_empty_root_password ; ",d)}'
-
 # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled
 ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'
index b2a3e9782080d06e766c5fa819e3014880f25f58..152164851eb66d59577820c2bd47294b0c8c3178 100644 (file)
@@ -162,10 +162,16 @@ IMAGE_CLASSES += "image_types"
 inherit ${IMAGE_CLASSES}
 
 IMAGE_POSTPROCESS_COMMAND ?= ""
+
+# Zap the root password if debug-tweaks feature is not enabled
+ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password ; ",d)}'
+
 # Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks is enabled
-ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "ssh_allow_empty_password; ", "",d)}'
+ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", "",d)}'
+
 # Enable postinst logging if debug-tweaks is enabled
-ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "postinst_enable_logging; ", "",d)}'
+ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}'
+
 # Write manifest
 IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest"
 ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "