summaryrefslogtreecommitdiffstats
path: root/meta/classes/populate_sdk_base.bbclass
diff options
context:
space:
mode:
authorFrancisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>2017-06-09 12:01:26 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-12 23:01:23 +0100
commit1b804d7944f3f2bfe9a414b045f313a0e1bff817 (patch)
tree42c5e48f4c401debb8ca96abdcbbd1e830383154 /meta/classes/populate_sdk_base.bbclass
parent08a4705af9cc677b32fd6489e67f86f7e9d6e92c (diff)
downloadpoky-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.bbclass44
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
60SDK_TARGET_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" 60SDK_TARGET_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
61SDK_HOST_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" 61SDK_HOST_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
62SDK_EXT_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest"
63SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest"
64
62python write_target_sdk_manifest () { 65python 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
73python write_sdk_test_data() { 77python write_sdk_test_data() {
@@ -78,20 +82,22 @@ python write_sdk_test_data() {
78} 82}
79 83
80python write_host_sdk_manifest () { 84python 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
91POPULATE_SDK_POST_TARGET_COMMAND_append = " write_target_sdk_manifest ; write_sdk_test_data ; " 96POPULATE_SDK_POST_TARGET_COMMAND_append = " write_sdk_test_data ; "
92POPULATE_SDK_POST_HOST_COMMAND_append = " write_host_sdk_manifest; " 97POPULATE_SDK_POST_TARGET_COMMAND_append_task-populate-sdk = " write_target_sdk_manifest ; "
98POPULATE_SDK_POST_HOST_COMMAND_append_task-populate-sdk = " write_host_sdk_manifest; "
93SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC};' if '${SDK_PACKAGING_FUNC}' else ''}" 99SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC};' if '${SDK_PACKAGING_FUNC}' else ''}"
94SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; ${SDK_PACKAGING_COMMAND} " 100SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; write_target_sdk_manifest; write_host_sdk_manifest; ${SDK_PACKAGING_COMMAND} "
95 101
96def populate_sdk_common(d): 102def populate_sdk_common(d):
97 from oe.sdk import populate_sdk 103 from oe.sdk import populate_sdk