diff options
-rw-r--r-- | meta/classes/buildhistory.bbclass | 1 | ||||
-rw-r--r-- | meta/classes/populate_sdk_base.bbclass | 44 | ||||
-rw-r--r-- | meta/classes/populate_sdk_ext.bbclass | 33 |
3 files changed, 58 insertions, 20 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 779a1a67e0..601b29f5a1 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
@@ -589,7 +589,6 @@ END | |||
589 | 589 | ||
590 | python buildhistory_get_extra_sdkinfo() { | 590 | python buildhistory_get_extra_sdkinfo() { |
591 | import operator | 591 | import operator |
592 | import math | ||
593 | from oe.sdk import get_extra_sdkinfo | 592 | from oe.sdk import get_extra_sdkinfo |
594 | 593 | ||
595 | sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache') | 594 | sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache') |
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 |
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index 69bc1d91dd..4791d74431 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass | |||
@@ -83,6 +83,39 @@ TOOLCHAIN_OUTPUTNAME_task-populate-sdk-ext = "${TOOLCHAINEXT_OUTPUTNAME}" | |||
83 | SDK_EXT_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest" | 83 | SDK_EXT_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest" |
84 | SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest" | 84 | SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest" |
85 | 85 | ||
86 | python write_target_sdk_ext_manifest () { | ||
87 | from oe.sdk import get_extra_sdkinfo | ||
88 | sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache') | ||
89 | extra_info = get_extra_sdkinfo(sstate_dir) | ||
90 | |||
91 | target = d.getVar('TARGET_SYS') | ||
92 | target_multimach = d.getVar('MULTIMACH_TARGET_SYS') | ||
93 | real_target_multimach = d.getVar('REAL_MULTIMACH_TARGET_SYS') | ||
94 | |||
95 | pkgs = {} | ||
96 | with open(d.getVar('SDK_EXT_TARGET_MANIFEST'), 'w') as f: | ||
97 | for fn in extra_info['filesizes']: | ||
98 | info = fn.split(':') | ||
99 | if info[2] in (target, target_multimach, real_target_multimach) \ | ||
100 | or info[5] == 'allarch': | ||
101 | if not info[1] in pkgs: | ||
102 | f.write("%s %s %s\n" % (info[1], info[2], info[3])) | ||
103 | pkgs[info[1]] = {} | ||
104 | } | ||
105 | python write_host_sdk_ext_manifest () { | ||
106 | from oe.sdk import get_extra_sdkinfo | ||
107 | sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache') | ||
108 | extra_info = get_extra_sdkinfo(sstate_dir) | ||
109 | host = d.getVar('BUILD_SYS') | ||
110 | with open(d.getVar('SDK_EXT_HOST_MANIFEST'), 'w') as f: | ||
111 | for fn in extra_info['filesizes']: | ||
112 | info = fn.split(':') | ||
113 | if info[2] == host: | ||
114 | f.write("%s %s %s\n" % (info[1], info[2], info[3])) | ||
115 | } | ||
116 | |||
117 | SDK_POSTPROCESS_COMMAND_append_task-populate-sdk-ext = "write_target_sdk_ext_manifest; write_host_sdk_ext_manifest; " | ||
118 | |||
86 | SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} Extensible SDK" | 119 | SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} Extensible SDK" |
87 | 120 | ||
88 | def clean_esdk_builddir(d, sdkbasepath): | 121 | def clean_esdk_builddir(d, sdkbasepath): |