diff options
author | Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> | 2017-06-09 12:01:26 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-12 23:01:23 +0100 |
commit | 1b804d7944f3f2bfe9a414b045f313a0e1bff817 (patch) | |
tree | 42c5e48f4c401debb8ca96abdcbbd1e830383154 /meta/classes/populate_sdk_base.bbclass | |
parent | 08a4705af9cc677b32fd6489e67f86f7e9d6e92c (diff) | |
download | poky-1b804d7944f3f2bfe9a414b045f313a0e1bff817.tar.gz |
meta/classes/populate_sdk: Adds support for generating eSDK manifest files
Add get_extra_sdk_info to reuse code in buildhistory
The functionalities to generate SDK and eSDK manifest files are different,
the SDK comes from package information and the eSDK comes from sstate artifacts.
Only execute write_sdk_{host, target}_manifest when is on populate_sdk class.
Adds new functions write_sdk{host, target}_ext_manifest to execute on postprocess
in populate_sdk_ext because at the end we have all the sstate artifacts to
generate the manifest.
[YOCTO #9038]
(From OE-Core rev: 25ad7ed6f7bb0c931b404bda09576323200d093d)
Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/populate_sdk_base.bbclass')
-rw-r--r-- | meta/classes/populate_sdk_base.bbclass | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index 563582e0a0..01960ee4cb 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass | |||
@@ -59,15 +59,19 @@ SDK_TITLE ?= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK" | |||
59 | 59 | ||
60 | SDK_TARGET_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" | 60 | SDK_TARGET_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" |
61 | SDK_HOST_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" | 61 | SDK_HOST_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" |
62 | SDK_EXT_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest" | ||
63 | SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest" | ||
64 | |||
62 | python write_target_sdk_manifest () { | 65 | python write_target_sdk_manifest () { |
63 | from oe.sdk import sdk_list_installed_packages | 66 | if d.getVar('BB_CURRENTTASK') == 'populate_sdk': |
64 | from oe.utils import format_pkg_list | 67 | from oe.sdk import sdk_list_installed_packages |
65 | sdkmanifestdir = os.path.dirname(d.getVar("SDK_TARGET_MANIFEST")) | 68 | from oe.utils import format_pkg_list |
66 | pkgs = sdk_list_installed_packages(d, True) | 69 | sdkmanifestdir = os.path.dirname(d.getVar("SDK_TARGET_MANIFEST")) |
67 | if not os.path.exists(sdkmanifestdir): | 70 | pkgs = sdk_list_installed_packages(d, True) |
68 | bb.utils.mkdirhier(sdkmanifestdir) | 71 | if not os.path.exists(sdkmanifestdir): |
69 | with open(d.getVar('SDK_TARGET_MANIFEST'), 'w') as output: | 72 | bb.utils.mkdirhier(sdkmanifestdir) |
70 | output.write(format_pkg_list(pkgs, 'ver')) | 73 | with open(d.getVar('SDK_TARGET_MANIFEST'), 'w') as output: |
74 | output.write(format_pkg_list(pkgs, 'ver')) | ||
71 | } | 75 | } |
72 | 76 | ||
73 | python write_sdk_test_data() { | 77 | python write_sdk_test_data() { |
@@ -78,20 +82,22 @@ python write_sdk_test_data() { | |||
78 | } | 82 | } |
79 | 83 | ||
80 | python write_host_sdk_manifest () { | 84 | python write_host_sdk_manifest () { |
81 | from oe.sdk import sdk_list_installed_packages | 85 | if d.getVar('BB_CURRENTTASK') == 'populate_sdk': |
82 | from oe.utils import format_pkg_list | 86 | from oe.sdk import sdk_list_installed_packages |
83 | sdkmanifestdir = os.path.dirname(d.getVar("SDK_HOST_MANIFEST")) | 87 | from oe.utils import format_pkg_list |
84 | pkgs = sdk_list_installed_packages(d, False) | 88 | sdkmanifestdir = os.path.dirname(d.getVar("SDK_HOST_MANIFEST")) |
85 | if not os.path.exists(sdkmanifestdir): | 89 | pkgs = sdk_list_installed_packages(d, False) |
86 | bb.utils.mkdirhier(sdkmanifestdir) | 90 | if not os.path.exists(sdkmanifestdir): |
87 | with open(d.getVar('SDK_HOST_MANIFEST'), 'w') as output: | 91 | bb.utils.mkdirhier(sdkmanifestdir) |
88 | output.write(format_pkg_list(pkgs, 'ver')) | 92 | with open(d.getVar('SDK_HOST_MANIFEST'), 'w') as output: |
93 | output.write(format_pkg_list(pkgs, 'ver')) | ||
89 | } | 94 | } |
90 | 95 | ||
91 | POPULATE_SDK_POST_TARGET_COMMAND_append = " write_target_sdk_manifest ; write_sdk_test_data ; " | 96 | POPULATE_SDK_POST_TARGET_COMMAND_append = " write_sdk_test_data ; " |
92 | POPULATE_SDK_POST_HOST_COMMAND_append = " write_host_sdk_manifest; " | 97 | POPULATE_SDK_POST_TARGET_COMMAND_append_task-populate-sdk = " write_target_sdk_manifest ; " |
98 | POPULATE_SDK_POST_HOST_COMMAND_append_task-populate-sdk = " write_host_sdk_manifest; " | ||
93 | SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC};' if '${SDK_PACKAGING_FUNC}' else ''}" | 99 | SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC};' if '${SDK_PACKAGING_FUNC}' else ''}" |
94 | SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; ${SDK_PACKAGING_COMMAND} " | 100 | SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; write_target_sdk_manifest; write_host_sdk_manifest; ${SDK_PACKAGING_COMMAND} " |
95 | 101 | ||
96 | def populate_sdk_common(d): | 102 | def populate_sdk_common(d): |
97 | from oe.sdk import populate_sdk | 103 | from oe.sdk import populate_sdk |