diff options
Diffstat (limited to 'meta/classes/populate_sdk_ext.bbclass')
-rw-r--r-- | meta/classes/populate_sdk_ext.bbclass | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index e5e55b3606..ebb57bba6b 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass | |||
@@ -24,6 +24,7 @@ SDK_INHERIT_BLACKLIST ?= "buildhistory icecc" | |||
24 | SDK_UPDATE_URL ?= "" | 24 | SDK_UPDATE_URL ?= "" |
25 | 25 | ||
26 | SDK_TARGETS ?= "${PN}" | 26 | SDK_TARGETS ?= "${PN}" |
27 | SDK_INSTALL_TARGETS = "${SDK_TARGETS} ${@'meta-world-pkgdata:do_allpackagedata' if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1' else ''}" | ||
27 | OE_INIT_ENV_SCRIPT ?= "oe-init-build-env" | 28 | OE_INIT_ENV_SCRIPT ?= "oe-init-build-env" |
28 | 29 | ||
29 | # The files from COREBASE that you want preserved in the COREBASE copied | 30 | # The files from COREBASE that you want preserved in the COREBASE copied |
@@ -45,6 +46,7 @@ SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME', True) or d.getVar( | |||
45 | 46 | ||
46 | python copy_buildsystem () { | 47 | python copy_buildsystem () { |
47 | import re | 48 | import re |
49 | import shutil | ||
48 | import oe.copy_buildsystem | 50 | import oe.copy_buildsystem |
49 | 51 | ||
50 | oe_init_env_script = d.getVar('OE_INIT_ENV_SCRIPT', True) | 52 | oe_init_env_script = d.getVar('OE_INIT_ENV_SCRIPT', True) |
@@ -91,6 +93,7 @@ python copy_buildsystem () { | |||
91 | config.set('General', 'core_meta_subdir', core_meta_subdir) | 93 | config.set('General', 'core_meta_subdir', core_meta_subdir) |
92 | config.add_section('SDK') | 94 | config.add_section('SDK') |
93 | config.set('SDK', 'sdk_targets', d.getVar('SDK_TARGETS', True)) | 95 | config.set('SDK', 'sdk_targets', d.getVar('SDK_TARGETS', True)) |
96 | config.set('SDK', 'sdk_update_targets', d.getVar('SDK_INSTALL_TARGETS', True)) | ||
94 | updateurl = d.getVar('SDK_UPDATE_URL', True) | 97 | updateurl = d.getVar('SDK_UPDATE_URL', True) |
95 | if updateurl: | 98 | if updateurl: |
96 | config.set('SDK', 'updateserver', updateurl) | 99 | config.set('SDK', 'updateserver', updateurl) |
@@ -199,6 +202,22 @@ python copy_buildsystem () { | |||
199 | d.getVar('SSTATE_DIR', True), | 202 | d.getVar('SSTATE_DIR', True), |
200 | sstate_out, d, | 203 | sstate_out, d, |
201 | fixedlsbstring) | 204 | fixedlsbstring) |
205 | |||
206 | # Add packagedata if enabled | ||
207 | if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1': | ||
208 | lockedsigs_base = d.getVar('WORKDIR', True) + '/locked-sigs-base.inc' | ||
209 | lockedsigs_copy = d.getVar('WORKDIR', True) + '/locked-sigs-copy.inc' | ||
210 | shutil.move(lockedsigs_pruned, lockedsigs_base) | ||
211 | oe.copy_buildsystem.merge_lockedsigs(['do_packagedata'], | ||
212 | lockedsigs_base, | ||
213 | d.getVar('STAGING_DIR_HOST', True) + '/world-pkgdata/locked-sigs-pkgdata.inc', | ||
214 | lockedsigs_pruned, | ||
215 | lockedsigs_copy) | ||
216 | oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_copy, | ||
217 | d.getVar('SSTATE_DIR', True), | ||
218 | sstate_out, d, | ||
219 | fixedlsbstring) | ||
220 | |||
202 | # We don't need sstate do_package files | 221 | # We don't need sstate do_package files |
203 | for root, dirs, files in os.walk(sstate_out): | 222 | for root, dirs, files in os.walk(sstate_out): |
204 | for name in files: | 223 | for name in files: |
@@ -268,7 +287,7 @@ sdk_ext_postinst() { | |||
268 | # current working directory when first ran, nor will it set $1 when | 287 | # current working directory when first ran, nor will it set $1 when |
269 | # sourcing a script. That is why this has to look so ugly. | 288 | # sourcing a script. That is why this has to look so ugly. |
270 | LOGFILE="$target_sdk_dir/preparing_build_system.log" | 289 | LOGFILE="$target_sdk_dir/preparing_build_system.log" |
271 | sh -c ". buildtools/environment-setup* > $LOGFILE && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && python $target_sdk_dir/ext-sdk-prepare.py '${SDK_TARGETS}' >> $LOGFILE 2>&1" || { echo "ERROR: SDK preparation failed: see $LOGFILE"; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; } | 290 | sh -c ". buildtools/environment-setup* > $LOGFILE && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && python $target_sdk_dir/ext-sdk-prepare.py '${SDK_INSTALL_TARGETS}' >> $LOGFILE 2>&1" || { echo "ERROR: SDK preparation failed: see $LOGFILE"; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; } |
272 | fi | 291 | fi |
273 | echo done | 292 | echo done |
274 | } | 293 | } |
@@ -314,7 +333,8 @@ def get_sdk_ext_rdepends(d): | |||
314 | do_populate_sdk_ext[dirs] = "${@d.getVarFlag('do_populate_sdk', 'dirs', False)}" | 333 | do_populate_sdk_ext[dirs] = "${@d.getVarFlag('do_populate_sdk', 'dirs', False)}" |
315 | 334 | ||
316 | do_populate_sdk_ext[depends] = "${@d.getVarFlag('do_populate_sdk', 'depends', False)} \ | 335 | do_populate_sdk_ext[depends] = "${@d.getVarFlag('do_populate_sdk', 'depends', False)} \ |
317 | buildtools-tarball:do_populate_sdk uninative-tarball:do_populate_sdk" | 336 | buildtools-tarball:do_populate_sdk uninative-tarball:do_populate_sdk \ |
337 | ${@'meta-world-pkgdata:do_collect_packagedata' if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1' else ''}" | ||
318 | 338 | ||
319 | do_populate_sdk_ext[rdepends] += "${@' '.join([x + ':do_build' for x in d.getVar('SDK_TARGETS', True).split()])}" | 339 | do_populate_sdk_ext[rdepends] += "${@' '.join([x + ':do_build' for x in d.getVar('SDK_TARGETS', True).split()])}" |
320 | 340 | ||