diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2016-03-31 02:20:11 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-31 23:01:37 +0100 |
commit | aa13b972860c82d32a6e44903c07e35afea27d1e (patch) | |
tree | 56319187f8536c4291e8f11362c9f3f933f21eab /meta/classes/image.bbclass | |
parent | 4dde12f17b5c0e8b029272284b9013cdef5ccd60 (diff) | |
download | poky-aa13b972860c82d32a6e44903c07e35afea27d1e.tar.gz |
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.
(From OE-Core rev: e3b881d4168e5b02ff00f5c470ba472ab8bbc747)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r-- | meta/classes/image.bbclass | 6 |
1 files changed, 5 insertions, 1 deletions
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" | |||
33 | # rootfs bootstrap install | 33 | # rootfs bootstrap install |
34 | ROOTFS_BOOTSTRAP_INSTALL = "${@bb.utils.contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}" | 34 | ROOTFS_BOOTSTRAP_INSTALL = "${@bb.utils.contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}" |
35 | 35 | ||
36 | # These packages will be removed from a read-only rootfs after all other | ||
37 | # packages have been installed | ||
38 | ROOTFS_RO_UNNEEDED = "update-rc.d base-passwd shadow ${VIRTUAL-RUNTIME_update-alternatives} ${ROOTFS_BOOTSTRAP_INSTALL}" | ||
39 | |||
36 | # packages to install from features | 40 | # packages to install from features |
37 | FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" | 41 | FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" |
38 | FEATURE_INSTALL[vardepvalue] = "${FEATURE_INSTALL}" | 42 | FEATURE_INSTALL[vardepvalue] = "${FEATURE_INSTALL}" |
@@ -114,7 +118,7 @@ def rootfs_variables(d): | |||
114 | 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','RM_OLD_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS', | 118 | 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','RM_OLD_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS', |
115 | 'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS', | 119 | 'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS', |
116 | 'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS', | 120 | 'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS', |
117 | 'COMPRESSIONTYPES', 'IMAGE_GEN_DEBUGFS'] | 121 | 'COMPRESSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED'] |
118 | variables.extend(rootfs_command_variables(d)) | 122 | variables.extend(rootfs_command_variables(d)) |
119 | variables.extend(variable_depends(d)) | 123 | variables.extend(variable_depends(d)) |
120 | return " ".join(variables) | 124 | return " ".join(variables) |