diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-04 13:18:03 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-05 11:52:50 +0000 |
commit | a099ed2125fbd822342b7fc124e3c659b26d29c9 (patch) | |
tree | d62cbc302f02f2e692acfc61cc7f0fad0d7bab81 /meta/classes-recipe | |
parent | 93be2cdf492e1ec3d3c13f9c2ce82346be323da6 (diff) | |
download | poky-a099ed2125fbd822342b7fc124e3c659b26d29c9.tar.gz |
package: Move pkgdata handling functions to oe.packagedata
To avoid reparsing the bbclass code all the time, move the functions
to the packagedata python function library code which is more efficient.
(From OE-Core rev: f520a3039540b1183b1b2bdaaf8b9195995c0187)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe')
-rw-r--r-- | meta/classes-recipe/image.bbclass | 7 | ||||
-rw-r--r-- | meta/classes-recipe/populate_sdk_base.bbclass | 9 |
2 files changed, 9 insertions, 7 deletions
diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass index e387645503..a06c9f544d 100644 --- a/meta/classes-recipe/image.bbclass +++ b/meta/classes-recipe/image.bbclass | |||
@@ -203,6 +203,7 @@ fakeroot python do_rootfs () { | |||
203 | from oe.rootfs import create_rootfs | 203 | from oe.rootfs import create_rootfs |
204 | from oe.manifest import create_manifest | 204 | from oe.manifest import create_manifest |
205 | import logging | 205 | import logging |
206 | import oe.packagedata | ||
206 | 207 | ||
207 | logger = d.getVar('BB_TASK_LOGGER', False) | 208 | logger = d.getVar('BB_TASK_LOGGER', False) |
208 | if logger: | 209 | if logger: |
@@ -247,9 +248,9 @@ fakeroot python do_rootfs () { | |||
247 | # otherwise, the multilib renaming could step in and squash any fixups that | 248 | # otherwise, the multilib renaming could step in and squash any fixups that |
248 | # may have occurred. | 249 | # may have occurred. |
249 | pn = d.getVar('PN') | 250 | pn = d.getVar('PN') |
250 | runtime_mapping_rename("PACKAGE_INSTALL", pn, d) | 251 | oe.packagedata.runtime_mapping_rename("PACKAGE_INSTALL", pn, d) |
251 | runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", pn, d) | 252 | oe.packagedata.runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", pn, d) |
252 | runtime_mapping_rename("BAD_RECOMMENDATIONS", pn, d) | 253 | oe.packagedata.runtime_mapping_rename("BAD_RECOMMENDATIONS", pn, d) |
253 | 254 | ||
254 | # Generate the initial manifest | 255 | # Generate the initial manifest |
255 | create_manifest(d) | 256 | create_manifest(d) |
diff --git a/meta/classes-recipe/populate_sdk_base.bbclass b/meta/classes-recipe/populate_sdk_base.bbclass index 917619962c..7cc9535356 100644 --- a/meta/classes-recipe/populate_sdk_base.bbclass +++ b/meta/classes-recipe/populate_sdk_base.bbclass | |||
@@ -162,6 +162,7 @@ SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; archive_sdk; $ | |||
162 | def populate_sdk_common(d): | 162 | def populate_sdk_common(d): |
163 | from oe.sdk import populate_sdk | 163 | from oe.sdk import populate_sdk |
164 | from oe.manifest import create_manifest, Manifest | 164 | from oe.manifest import create_manifest, Manifest |
165 | import oe.packagedata | ||
165 | 166 | ||
166 | # Handle package exclusions | 167 | # Handle package exclusions |
167 | excl_pkgs = (d.getVar("PACKAGE_EXCLUDE") or "").split() | 168 | excl_pkgs = (d.getVar("PACKAGE_EXCLUDE") or "").split() |
@@ -184,13 +185,13 @@ def populate_sdk_common(d): | |||
184 | d.setVar("PACKAGE_INSTALL_ATTEMPTONLY", ' '.join(inst_attempt_pkgs)) | 185 | d.setVar("PACKAGE_INSTALL_ATTEMPTONLY", ' '.join(inst_attempt_pkgs)) |
185 | 186 | ||
186 | pn = d.getVar('PN') | 187 | pn = d.getVar('PN') |
187 | runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", pn, d) | 188 | oe.packagedata.runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", pn, d) |
188 | runtime_mapping_rename("TOOLCHAIN_TARGET_TASK_ATTEMPTONLY", pn, d) | 189 | oe.packagedata.runtime_mapping_rename("TOOLCHAIN_TARGET_TASK_ATTEMPTONLY", pn, d) |
189 | 190 | ||
190 | ld = bb.data.createCopy(d) | 191 | ld = bb.data.createCopy(d) |
191 | ld.setVar("PKGDATA_DIR", "${STAGING_DIR}/${SDK_ARCH}-${SDKPKGSUFFIX}${SDK_VENDOR}-${SDK_OS}/pkgdata") | 192 | ld.setVar("PKGDATA_DIR", "${STAGING_DIR}/${SDK_ARCH}-${SDKPKGSUFFIX}${SDK_VENDOR}-${SDK_OS}/pkgdata") |
192 | runtime_mapping_rename("TOOLCHAIN_HOST_TASK", pn, ld) | 193 | oe.packagedata.runtime_mapping_rename("TOOLCHAIN_HOST_TASK", pn, ld) |
193 | runtime_mapping_rename("TOOLCHAIN_HOST_TASK_ATTEMPTONLY", pn, ld) | 194 | oe.packagedata.runtime_mapping_rename("TOOLCHAIN_HOST_TASK_ATTEMPTONLY", pn, ld) |
194 | d.setVar("TOOLCHAIN_HOST_TASK", ld.getVar("TOOLCHAIN_HOST_TASK")) | 195 | d.setVar("TOOLCHAIN_HOST_TASK", ld.getVar("TOOLCHAIN_HOST_TASK")) |
195 | d.setVar("TOOLCHAIN_HOST_TASK_ATTEMPTONLY", ld.getVar("TOOLCHAIN_HOST_TASK_ATTEMPTONLY")) | 196 | d.setVar("TOOLCHAIN_HOST_TASK_ATTEMPTONLY", ld.getVar("TOOLCHAIN_HOST_TASK_ATTEMPTONLY")) |
196 | 197 | ||