From e3b881d4168e5b02ff00f5c470ba472ab8bbc747 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Thu, 31 Mar 2016 02:20:11 +0200 Subject: image.bbclass: Make unneeded packages for a read-only rootfs configurable Previously the list of packages that are considered unneeded for a read-only rootfs was hardcoded. This made it impossible to, e.g., have shadow installed on a system with a read-only rootfs, but where /etc is mounted writable. This also lists ${VIRTUAL-RUNTIME_update-alternatives} rather than update-alternatives (as was previously the case) since this should actually remove the intended package. Signed-off-by: Peter Kjellerstedt Signed-off-by: Richard Purdie --- meta/classes/image.bbclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'meta/classes') diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 62ff07e2e7..894ff993cc 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -33,6 +33,10 @@ IMAGE_GEN_DEBUGFS ?= "0" # rootfs bootstrap install ROOTFS_BOOTSTRAP_INSTALL = "${@bb.utils.contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}" +# These packages will be removed from a read-only rootfs after all other +# packages have been installed +ROOTFS_RO_UNNEEDED = "update-rc.d base-passwd shadow ${VIRTUAL-RUNTIME_update-alternatives} ${ROOTFS_BOOTSTRAP_INSTALL}" + # packages to install from features FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" FEATURE_INSTALL[vardepvalue] = "${FEATURE_INSTALL}" @@ -114,7 +118,7 @@ def rootfs_variables(d): 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','RM_OLD_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS', 'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS', 'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS', - 'COMPRESSIONTYPES', 'IMAGE_GEN_DEBUGFS'] + 'COMPRESSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED'] variables.extend(rootfs_command_variables(d)) variables.extend(variable_depends(d)) return " ".join(variables) -- cgit 1.2.3-korg