diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-31 13:27:50 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-01-18 10:15:58 +0000 |
commit | c917323a39da6fc3e8d92b2fe907d0357149c9bb (patch) | |
tree | 254fd4963f6a7c0f65f5cc9aa1834158fc94b457 /meta/classes-recipe/image.bbclass | |
parent | bc883e49912b8d0cdc9ea403e85f2cb3198b48ff (diff) | |
download | poky-c917323a39da6fc3e8d92b2fe907d0357149c9bb.tar.gz |
classes/recipes: Switch to use inherit_defer
Now that bitbake supports the use of inherit_defer, switch all conditional
(variable based) inherits to use this instead. This leads to more a more
deterministic user experience since there is no longer an immediate expansion
and later changes to the variables in question (e.g. a bbappend) are
accounted for.
This patch tries to ensure the behaviour before/after remains as unchanged
as it reasonably can, e.g. by always inherting populate_sdk_base. native
and nativesdk continue to need to be inherited last, hence being used
with inherit_defer in a handful of very specific cases.
(From OE-Core rev: 451363438d38bd4552d5bcec4a92332f5819a5d4)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/image.bbclass')
-rw-r--r-- | meta/classes-recipe/image.bbclass | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass index 6bdddc0134..28be6c6362 100644 --- a/meta/classes-recipe/image.bbclass +++ b/meta/classes-recipe/image.bbclass | |||
@@ -14,14 +14,15 @@ ROOTFS_BOOTSTRAP_INSTALL = "run-postinsts" | |||
14 | IMGCLASSES = "rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}" | 14 | IMGCLASSES = "rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}" |
15 | # Only Linux SDKs support populate_sdk_ext, fall back to populate_sdk_base | 15 | # Only Linux SDKs support populate_sdk_ext, fall back to populate_sdk_base |
16 | # in the non-Linux SDK_OS case, such as mingw32 | 16 | # in the non-Linux SDK_OS case, such as mingw32 |
17 | IMGCLASSES += "${@['populate_sdk_base', 'populate_sdk_ext']['linux' in d.getVar("SDK_OS")]}" | 17 | inherit populate_sdk_base |
18 | IMGCLASSES += "${@['', 'populate_sdk_ext']['linux' in d.getVar("SDK_OS")]}" | ||
18 | IMGCLASSES += "${@bb.utils.contains_any('IMAGE_FSTYPES', 'live iso hddimg', 'image-live', '', d)}" | 19 | IMGCLASSES += "${@bb.utils.contains_any('IMAGE_FSTYPES', 'live iso hddimg', 'image-live', '', d)}" |
19 | IMGCLASSES += "${@bb.utils.contains('IMAGE_FSTYPES', 'container', 'image-container', '', d)}" | 20 | IMGCLASSES += "${@bb.utils.contains('IMAGE_FSTYPES', 'container', 'image-container', '', d)}" |
20 | IMGCLASSES += "image_types_wic" | 21 | IMGCLASSES += "image_types_wic" |
21 | IMGCLASSES += "rootfs-postcommands" | 22 | IMGCLASSES += "rootfs-postcommands" |
22 | IMGCLASSES += "image-postinst-intercepts" | 23 | IMGCLASSES += "image-postinst-intercepts" |
23 | IMGCLASSES += "overlayfs-etc" | 24 | IMGCLASSES += "overlayfs-etc" |
24 | inherit ${IMGCLASSES} | 25 | inherit_defer ${IMGCLASSES} |
25 | 26 | ||
26 | TOOLCHAIN_TARGET_TASK += "${PACKAGE_INSTALL}" | 27 | TOOLCHAIN_TARGET_TASK += "${PACKAGE_INSTALL}" |
27 | TOOLCHAIN_TARGET_TASK_ATTEMPTONLY += "${PACKAGE_INSTALL_ATTEMPTONLY}" | 28 | TOOLCHAIN_TARGET_TASK_ATTEMPTONLY += "${PACKAGE_INSTALL_ATTEMPTONLY}" |