diff options
author | Joshua Lock <joshua.g.lock@intel.com> | 2016-12-14 21:13:04 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-16 10:23:23 +0000 |
commit | c4e2c59088765d1f1de7ec57cde91980f887c2ff (patch) | |
tree | a2fda8ac5916fb59a711e9220c2177008cca9347 /meta/classes/populate_sdk_ext.bbclass | |
parent | d5e67725ac11e3296cad104470931ffa16824b90 (diff) | |
download | poky-c4e2c59088765d1f1de7ec57cde91980f887c2ff.tar.gz |
meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.
Search made with the following regex: getVar ?\(( ?[^,()]*), True\)
(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/populate_sdk_ext.bbclass')
-rw-r--r-- | meta/classes/populate_sdk_ext.bbclass | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index 1affa9dfaa..be8b6a1f6f 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass | |||
@@ -21,7 +21,7 @@ SDK_EXT_task-populate-sdk-ext = "-ext" | |||
21 | # Options are full or minimal | 21 | # Options are full or minimal |
22 | SDK_EXT_TYPE ?= "full" | 22 | SDK_EXT_TYPE ?= "full" |
23 | SDK_INCLUDE_PKGDATA ?= "0" | 23 | SDK_INCLUDE_PKGDATA ?= "0" |
24 | SDK_INCLUDE_TOOLCHAIN ?= "${@'1' if d.getVar('SDK_EXT_TYPE', True) == 'full' else '0'}" | 24 | SDK_INCLUDE_TOOLCHAIN ?= "${@'1' if d.getVar('SDK_EXT_TYPE') == 'full' else '0'}" |
25 | 25 | ||
26 | SDK_RECRDEP_TASKS ?= "" | 26 | SDK_RECRDEP_TASKS ?= "" |
27 | 27 | ||
@@ -43,8 +43,8 @@ SDK_TARGETS ?= "${PN}" | |||
43 | 43 | ||
44 | def get_sdk_install_targets(d, images_only=False): | 44 | def get_sdk_install_targets(d, images_only=False): |
45 | sdk_install_targets = '' | 45 | sdk_install_targets = '' |
46 | if images_only or d.getVar('SDK_EXT_TYPE', True) != 'minimal': | 46 | if images_only or d.getVar('SDK_EXT_TYPE') != 'minimal': |
47 | sdk_install_targets = d.getVar('SDK_TARGETS', True) | 47 | sdk_install_targets = d.getVar('SDK_TARGETS') |
48 | 48 | ||
49 | depd = d.getVar('BB_TASKDEPDATA', False) | 49 | depd = d.getVar('BB_TASKDEPDATA', False) |
50 | for v in depd.values(): | 50 | for v in depd.values(): |
@@ -53,9 +53,9 @@ def get_sdk_install_targets(d, images_only=False): | |||
53 | sdk_install_targets += ' {}'.format(v[0]) | 53 | sdk_install_targets += ' {}'.format(v[0]) |
54 | 54 | ||
55 | if not images_only: | 55 | if not images_only: |
56 | if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1': | 56 | if d.getVar('SDK_INCLUDE_PKGDATA') == '1': |
57 | sdk_install_targets += ' meta-world-pkgdata:do_allpackagedata' | 57 | sdk_install_targets += ' meta-world-pkgdata:do_allpackagedata' |
58 | if d.getVar('SDK_INCLUDE_TOOLCHAIN', True) == '1': | 58 | if d.getVar('SDK_INCLUDE_TOOLCHAIN') == '1': |
59 | sdk_install_targets += ' meta-extsdk-toolchain:do_populate_sysroot' | 59 | sdk_install_targets += ' meta-extsdk-toolchain:do_populate_sysroot' |
60 | 60 | ||
61 | return sdk_install_targets | 61 | return sdk_install_targets |
@@ -83,7 +83,7 @@ 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 | SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME', True) or d.getVar('DISTRO', True)} Extensible SDK" | 86 | SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} Extensible SDK" |
87 | 87 | ||
88 | def clean_esdk_builddir(d, sdkbasepath): | 88 | def clean_esdk_builddir(d, sdkbasepath): |
89 | """Clean up traces of the fake build for create_filtered_tasklist()""" | 89 | """Clean up traces of the fake build for create_filtered_tasklist()""" |
@@ -110,7 +110,7 @@ def create_filtered_tasklist(d, sdkbasepath, tasklistfile, conf_initpath): | |||
110 | try: | 110 | try: |
111 | with open(sdkbasepath + '/conf/local.conf', 'a') as f: | 111 | with open(sdkbasepath + '/conf/local.conf', 'a') as f: |
112 | # Force the use of sstate from the build system | 112 | # Force the use of sstate from the build system |
113 | f.write('\nSSTATE_DIR_forcevariable = "%s"\n' % d.getVar('SSTATE_DIR', True)) | 113 | f.write('\nSSTATE_DIR_forcevariable = "%s"\n' % d.getVar('SSTATE_DIR')) |
114 | f.write('SSTATE_MIRRORS_forcevariable = ""\n') | 114 | f.write('SSTATE_MIRRORS_forcevariable = ""\n') |
115 | # Ensure TMPDIR is the default so that clean_esdk_builddir() can delete it | 115 | # Ensure TMPDIR is the default so that clean_esdk_builddir() can delete it |
116 | f.write('TMPDIR_forcevariable = "${TOPDIR}/tmp"\n') | 116 | f.write('TMPDIR_forcevariable = "${TOPDIR}/tmp"\n') |
@@ -121,7 +121,7 @@ def create_filtered_tasklist(d, sdkbasepath, tasklistfile, conf_initpath): | |||
121 | 121 | ||
122 | # Unfortunately the default SDKPATH (or even a custom value) may contain characters that bitbake | 122 | # Unfortunately the default SDKPATH (or even a custom value) may contain characters that bitbake |
123 | # will not allow in its COREBASE path, so we need to rename the directory temporarily | 123 | # will not allow in its COREBASE path, so we need to rename the directory temporarily |
124 | temp_sdkbasepath = d.getVar('SDK_OUTPUT', True) + '/tmp-renamed-sdk' | 124 | temp_sdkbasepath = d.getVar('SDK_OUTPUT') + '/tmp-renamed-sdk' |
125 | # Delete any existing temp dir | 125 | # Delete any existing temp dir |
126 | try: | 126 | try: |
127 | shutil.rmtree(temp_sdkbasepath) | 127 | shutil.rmtree(temp_sdkbasepath) |
@@ -130,7 +130,7 @@ def create_filtered_tasklist(d, sdkbasepath, tasklistfile, conf_initpath): | |||
130 | os.rename(sdkbasepath, temp_sdkbasepath) | 130 | os.rename(sdkbasepath, temp_sdkbasepath) |
131 | try: | 131 | try: |
132 | cmdprefix = '. %s .; ' % conf_initpath | 132 | cmdprefix = '. %s .; ' % conf_initpath |
133 | logfile = d.getVar('WORKDIR', True) + '/tasklist_bb_log.txt' | 133 | logfile = d.getVar('WORKDIR') + '/tasklist_bb_log.txt' |
134 | try: | 134 | try: |
135 | oe.copy_buildsystem.check_sstate_task_list(d, get_sdk_install_targets(d), tasklistfile, cmdprefix=cmdprefix, cwd=temp_sdkbasepath, logfile=logfile) | 135 | oe.copy_buildsystem.check_sstate_task_list(d, get_sdk_install_targets(d), tasklistfile, cmdprefix=cmdprefix, cwd=temp_sdkbasepath, logfile=logfile) |
136 | except bb.process.ExecutionError as e: | 136 | except bb.process.ExecutionError as e: |
@@ -152,7 +152,7 @@ python copy_buildsystem () { | |||
152 | import glob | 152 | import glob |
153 | import oe.copy_buildsystem | 153 | import oe.copy_buildsystem |
154 | 154 | ||
155 | oe_init_env_script = d.getVar('OE_INIT_ENV_SCRIPT', True) | 155 | oe_init_env_script = d.getVar('OE_INIT_ENV_SCRIPT') |
156 | 156 | ||
157 | conf_bbpath = '' | 157 | conf_bbpath = '' |
158 | conf_initpath = '' | 158 | conf_initpath = '' |
@@ -160,10 +160,10 @@ python copy_buildsystem () { | |||
160 | 160 | ||
161 | # Copy in all metadata layers + bitbake (as repositories) | 161 | # Copy in all metadata layers + bitbake (as repositories) |
162 | buildsystem = oe.copy_buildsystem.BuildSystem('extensible SDK', d) | 162 | buildsystem = oe.copy_buildsystem.BuildSystem('extensible SDK', d) |
163 | baseoutpath = d.getVar('SDK_OUTPUT', True) + '/' + d.getVar('SDKPATH', True) | 163 | baseoutpath = d.getVar('SDK_OUTPUT') + '/' + d.getVar('SDKPATH') |
164 | 164 | ||
165 | # Determine if we're building a derivative extensible SDK (from devtool build-sdk) | 165 | # Determine if we're building a derivative extensible SDK (from devtool build-sdk) |
166 | derivative = (d.getVar('SDK_DERIVATIVE', True) or '') == '1' | 166 | derivative = (d.getVar('SDK_DERIVATIVE') or '') == '1' |
167 | if derivative: | 167 | if derivative: |
168 | workspace_name = 'orig-workspace' | 168 | workspace_name = 'orig-workspace' |
169 | else: | 169 | else: |
@@ -171,7 +171,7 @@ python copy_buildsystem () { | |||
171 | layers_copied = buildsystem.copy_bitbake_and_layers(baseoutpath + '/layers', workspace_name) | 171 | layers_copied = buildsystem.copy_bitbake_and_layers(baseoutpath + '/layers', workspace_name) |
172 | 172 | ||
173 | sdkbblayers = [] | 173 | sdkbblayers = [] |
174 | corebase = os.path.basename(d.getVar('COREBASE', True)) | 174 | corebase = os.path.basename(d.getVar('COREBASE')) |
175 | for layer in layers_copied: | 175 | for layer in layers_copied: |
176 | if corebase == os.path.basename(layer): | 176 | if corebase == os.path.basename(layer): |
177 | conf_bbpath = os.path.join('layers', layer, 'bitbake') | 177 | conf_bbpath = os.path.join('layers', layer, 'bitbake') |
@@ -202,8 +202,8 @@ python copy_buildsystem () { | |||
202 | config.set('General', 'init_path', conf_initpath) | 202 | config.set('General', 'init_path', conf_initpath) |
203 | config.set('General', 'core_meta_subdir', core_meta_subdir) | 203 | config.set('General', 'core_meta_subdir', core_meta_subdir) |
204 | config.add_section('SDK') | 204 | config.add_section('SDK') |
205 | config.set('SDK', 'sdk_targets', d.getVar('SDK_TARGETS', True)) | 205 | config.set('SDK', 'sdk_targets', d.getVar('SDK_TARGETS')) |
206 | updateurl = d.getVar('SDK_UPDATE_URL', True) | 206 | updateurl = d.getVar('SDK_UPDATE_URL') |
207 | if updateurl: | 207 | if updateurl: |
208 | config.set('SDK', 'updateserver', updateurl) | 208 | config.set('SDK', 'updateserver', updateurl) |
209 | bb.utils.mkdirhier(os.path.join(baseoutpath, 'conf')) | 209 | bb.utils.mkdirhier(os.path.join(baseoutpath, 'conf')) |
@@ -215,7 +215,7 @@ python copy_buildsystem () { | |||
215 | pass | 215 | pass |
216 | 216 | ||
217 | # Create a layer for new recipes / appends | 217 | # Create a layer for new recipes / appends |
218 | bbpath = d.getVar('BBPATH', True) | 218 | bbpath = d.getVar('BBPATH') |
219 | bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')]) | 219 | bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')]) |
220 | 220 | ||
221 | # Create bblayers.conf | 221 | # Create bblayers.conf |
@@ -248,16 +248,16 @@ python copy_buildsystem () { | |||
248 | bb.utils.mkdirhier(uninative_outdir) | 248 | bb.utils.mkdirhier(uninative_outdir) |
249 | shutil.copy(uninative_file, uninative_outdir) | 249 | shutil.copy(uninative_file, uninative_outdir) |
250 | 250 | ||
251 | env_whitelist = (d.getVar('BB_ENV_EXTRAWHITE', True) or '').split() | 251 | env_whitelist = (d.getVar('BB_ENV_EXTRAWHITE') or '').split() |
252 | env_whitelist_values = {} | 252 | env_whitelist_values = {} |
253 | 253 | ||
254 | # Create local.conf | 254 | # Create local.conf |
255 | builddir = d.getVar('TOPDIR', True) | 255 | builddir = d.getVar('TOPDIR') |
256 | if derivative: | 256 | if derivative: |
257 | shutil.copyfile(builddir + '/conf/local.conf', baseoutpath + '/conf/local.conf') | 257 | shutil.copyfile(builddir + '/conf/local.conf', baseoutpath + '/conf/local.conf') |
258 | else: | 258 | else: |
259 | local_conf_whitelist = (d.getVar('SDK_LOCAL_CONF_WHITELIST', True) or '').split() | 259 | local_conf_whitelist = (d.getVar('SDK_LOCAL_CONF_WHITELIST') or '').split() |
260 | local_conf_blacklist = (d.getVar('SDK_LOCAL_CONF_BLACKLIST', True) or '').split() | 260 | local_conf_blacklist = (d.getVar('SDK_LOCAL_CONF_BLACKLIST') or '').split() |
261 | def handle_var(varname, origvalue, op, newlines): | 261 | def handle_var(varname, origvalue, op, newlines): |
262 | if varname in local_conf_blacklist or (origvalue.strip().startswith('/') and not varname in local_conf_whitelist): | 262 | if varname in local_conf_blacklist or (origvalue.strip().startswith('/') and not varname in local_conf_whitelist): |
263 | newlines.append('# Removed original setting of %s\n' % varname) | 263 | newlines.append('# Removed original setting of %s\n' % varname) |
@@ -285,7 +285,7 @@ python copy_buildsystem () { | |||
285 | f.write('DL_DIR = "${TOPDIR}/downloads"\n') | 285 | f.write('DL_DIR = "${TOPDIR}/downloads"\n') |
286 | 286 | ||
287 | f.write('INHERIT += "%s"\n' % 'uninative') | 287 | f.write('INHERIT += "%s"\n' % 'uninative') |
288 | f.write('UNINATIVE_CHECKSUM[%s] = "%s"\n\n' % (d.getVar('BUILD_ARCH', True), uninative_checksum)) | 288 | f.write('UNINATIVE_CHECKSUM[%s] = "%s"\n\n' % (d.getVar('BUILD_ARCH'), uninative_checksum)) |
289 | f.write('CONF_VERSION = "%s"\n\n' % d.getVar('CONF_VERSION', False)) | 289 | f.write('CONF_VERSION = "%s"\n\n' % d.getVar('CONF_VERSION', False)) |
290 | 290 | ||
291 | # Some classes are not suitable for SDK, remove them from INHERIT | 291 | # Some classes are not suitable for SDK, remove them from INHERIT |
@@ -319,7 +319,7 @@ python copy_buildsystem () { | |||
319 | 319 | ||
320 | # If you define a sdk_extraconf() function then it can contain additional config | 320 | # If you define a sdk_extraconf() function then it can contain additional config |
321 | # (Though this is awkward; sdk-extra.conf should probably be used instead) | 321 | # (Though this is awkward; sdk-extra.conf should probably be used instead) |
322 | extraconf = (d.getVar('sdk_extraconf', True) or '').strip() | 322 | extraconf = (d.getVar('sdk_extraconf') or '').strip() |
323 | if extraconf: | 323 | if extraconf: |
324 | # Strip off any leading / trailing spaces | 324 | # Strip off any leading / trailing spaces |
325 | for line in extraconf.splitlines(): | 325 | for line in extraconf.splitlines(): |
@@ -352,7 +352,7 @@ python copy_buildsystem () { | |||
352 | # BB_ENV_EXTRAWHITE) are set in the SDK's configuration | 352 | # BB_ENV_EXTRAWHITE) are set in the SDK's configuration |
353 | extralines = [] | 353 | extralines = [] |
354 | for name, value in env_whitelist_values.items(): | 354 | for name, value in env_whitelist_values.items(): |
355 | actualvalue = d.getVar(name, True) or '' | 355 | actualvalue = d.getVar(name) or '' |
356 | if value != actualvalue: | 356 | if value != actualvalue: |
357 | extralines.append('%s = "%s"\n' % (name, actualvalue)) | 357 | extralines.append('%s = "%s"\n' % (name, actualvalue)) |
358 | if extralines: | 358 | if extralines: |
@@ -365,7 +365,7 @@ python copy_buildsystem () { | |||
365 | 365 | ||
366 | # Filter the locked signatures file to just the sstate tasks we are interested in | 366 | # Filter the locked signatures file to just the sstate tasks we are interested in |
367 | excluded_targets = get_sdk_install_targets(d, images_only=True) | 367 | excluded_targets = get_sdk_install_targets(d, images_only=True) |
368 | sigfile = d.getVar('WORKDIR', True) + '/locked-sigs.inc' | 368 | sigfile = d.getVar('WORKDIR') + '/locked-sigs.inc' |
369 | lockedsigs_pruned = baseoutpath + '/conf/locked-sigs.inc' | 369 | lockedsigs_pruned = baseoutpath + '/conf/locked-sigs.inc' |
370 | oe.copy_buildsystem.prune_lockedsigs([], | 370 | oe.copy_buildsystem.prune_lockedsigs([], |
371 | excluded_targets.split(), | 371 | excluded_targets.split(), |
@@ -378,36 +378,36 @@ python copy_buildsystem () { | |||
378 | # uninative.bbclass sets NATIVELSBSTRING to 'universal%s' % oe.utils.host_gcc_version(d) | 378 | # uninative.bbclass sets NATIVELSBSTRING to 'universal%s' % oe.utils.host_gcc_version(d) |
379 | fixedlsbstring = "universal%s" % oe.utils.host_gcc_version(d) | 379 | fixedlsbstring = "universal%s" % oe.utils.host_gcc_version(d) |
380 | 380 | ||
381 | sdk_include_toolchain = (d.getVar('SDK_INCLUDE_TOOLCHAIN', True) == '1') | 381 | sdk_include_toolchain = (d.getVar('SDK_INCLUDE_TOOLCHAIN') == '1') |
382 | sdk_ext_type = d.getVar('SDK_EXT_TYPE', True) | 382 | sdk_ext_type = d.getVar('SDK_EXT_TYPE') |
383 | if sdk_ext_type != 'minimal' or sdk_include_toolchain or derivative: | 383 | if sdk_ext_type != 'minimal' or sdk_include_toolchain or derivative: |
384 | # Create the filtered task list used to generate the sstate cache shipped with the SDK | 384 | # Create the filtered task list used to generate the sstate cache shipped with the SDK |
385 | tasklistfn = d.getVar('WORKDIR', True) + '/tasklist.txt' | 385 | tasklistfn = d.getVar('WORKDIR') + '/tasklist.txt' |
386 | create_filtered_tasklist(d, baseoutpath, tasklistfn, conf_initpath) | 386 | create_filtered_tasklist(d, baseoutpath, tasklistfn, conf_initpath) |
387 | else: | 387 | else: |
388 | tasklistfn = None | 388 | tasklistfn = None |
389 | 389 | ||
390 | # Add packagedata if enabled | 390 | # Add packagedata if enabled |
391 | if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1': | 391 | if d.getVar('SDK_INCLUDE_PKGDATA') == '1': |
392 | lockedsigs_base = d.getVar('WORKDIR', True) + '/locked-sigs-base.inc' | 392 | lockedsigs_base = d.getVar('WORKDIR') + '/locked-sigs-base.inc' |
393 | lockedsigs_copy = d.getVar('WORKDIR', True) + '/locked-sigs-copy.inc' | 393 | lockedsigs_copy = d.getVar('WORKDIR') + '/locked-sigs-copy.inc' |
394 | shutil.move(lockedsigs_pruned, lockedsigs_base) | 394 | shutil.move(lockedsigs_pruned, lockedsigs_base) |
395 | oe.copy_buildsystem.merge_lockedsigs(['do_packagedata'], | 395 | oe.copy_buildsystem.merge_lockedsigs(['do_packagedata'], |
396 | lockedsigs_base, | 396 | lockedsigs_base, |
397 | d.getVar('STAGING_DIR_HOST', True) + '/world-pkgdata/locked-sigs-pkgdata.inc', | 397 | d.getVar('STAGING_DIR_HOST') + '/world-pkgdata/locked-sigs-pkgdata.inc', |
398 | lockedsigs_pruned, | 398 | lockedsigs_pruned, |
399 | lockedsigs_copy) | 399 | lockedsigs_copy) |
400 | 400 | ||
401 | if sdk_include_toolchain: | 401 | if sdk_include_toolchain: |
402 | lockedsigs_base = d.getVar('WORKDIR', True) + '/locked-sigs-base2.inc' | 402 | lockedsigs_base = d.getVar('WORKDIR') + '/locked-sigs-base2.inc' |
403 | lockedsigs_toolchain = d.getVar('STAGING_DIR_HOST', True) + '/locked-sigs/locked-sigs-extsdk-toolchain.inc' | 403 | lockedsigs_toolchain = d.getVar('STAGING_DIR_HOST') + '/locked-sigs/locked-sigs-extsdk-toolchain.inc' |
404 | shutil.move(lockedsigs_pruned, lockedsigs_base) | 404 | shutil.move(lockedsigs_pruned, lockedsigs_base) |
405 | oe.copy_buildsystem.merge_lockedsigs([], | 405 | oe.copy_buildsystem.merge_lockedsigs([], |
406 | lockedsigs_base, | 406 | lockedsigs_base, |
407 | lockedsigs_toolchain, | 407 | lockedsigs_toolchain, |
408 | lockedsigs_pruned) | 408 | lockedsigs_pruned) |
409 | oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_toolchain, | 409 | oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_toolchain, |
410 | d.getVar('SSTATE_DIR', True), | 410 | d.getVar('SSTATE_DIR'), |
411 | sstate_out, d, | 411 | sstate_out, d, |
412 | fixedlsbstring, | 412 | fixedlsbstring, |
413 | filterfile=tasklistfn) | 413 | filterfile=tasklistfn) |
@@ -417,22 +417,22 @@ python copy_buildsystem () { | |||
417 | # Assume the user is not going to set up an additional sstate | 417 | # Assume the user is not going to set up an additional sstate |
418 | # mirror, thus we need to copy the additional artifacts (from | 418 | # mirror, thus we need to copy the additional artifacts (from |
419 | # workspace recipes) into the derivative SDK | 419 | # workspace recipes) into the derivative SDK |
420 | lockedsigs_orig = d.getVar('TOPDIR', True) + '/conf/locked-sigs.inc' | 420 | lockedsigs_orig = d.getVar('TOPDIR') + '/conf/locked-sigs.inc' |
421 | if os.path.exists(lockedsigs_orig): | 421 | if os.path.exists(lockedsigs_orig): |
422 | lockedsigs_extra = d.getVar('WORKDIR', True) + '/locked-sigs-extra.inc' | 422 | lockedsigs_extra = d.getVar('WORKDIR') + '/locked-sigs-extra.inc' |
423 | oe.copy_buildsystem.merge_lockedsigs(None, | 423 | oe.copy_buildsystem.merge_lockedsigs(None, |
424 | lockedsigs_orig, | 424 | lockedsigs_orig, |
425 | lockedsigs_pruned, | 425 | lockedsigs_pruned, |
426 | None, | 426 | None, |
427 | lockedsigs_extra) | 427 | lockedsigs_extra) |
428 | oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_extra, | 428 | oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_extra, |
429 | d.getVar('SSTATE_DIR', True), | 429 | d.getVar('SSTATE_DIR'), |
430 | sstate_out, d, | 430 | sstate_out, d, |
431 | fixedlsbstring, | 431 | fixedlsbstring, |
432 | filterfile=tasklistfn) | 432 | filterfile=tasklistfn) |
433 | else: | 433 | else: |
434 | oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_pruned, | 434 | oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_pruned, |
435 | d.getVar('SSTATE_DIR', True), | 435 | d.getVar('SSTATE_DIR'), |
436 | sstate_out, d, | 436 | sstate_out, d, |
437 | fixedlsbstring, | 437 | fixedlsbstring, |
438 | filterfile=tasklistfn) | 438 | filterfile=tasklistfn) |
@@ -463,24 +463,24 @@ python copy_buildsystem () { | |||
463 | def get_current_buildtools(d): | 463 | def get_current_buildtools(d): |
464 | """Get the file name of the current buildtools installer""" | 464 | """Get the file name of the current buildtools installer""" |
465 | import glob | 465 | import glob |
466 | btfiles = glob.glob(os.path.join(d.getVar('SDK_DEPLOY', True), '*-buildtools-nativesdk-standalone-*.sh')) | 466 | btfiles = glob.glob(os.path.join(d.getVar('SDK_DEPLOY'), '*-buildtools-nativesdk-standalone-*.sh')) |
467 | btfiles.sort(key=os.path.getctime) | 467 | btfiles.sort(key=os.path.getctime) |
468 | return os.path.basename(btfiles[-1]) | 468 | return os.path.basename(btfiles[-1]) |
469 | 469 | ||
470 | def get_sdk_required_utilities(buildtools_fn, d): | 470 | def get_sdk_required_utilities(buildtools_fn, d): |
471 | """Find required utilities that aren't provided by the buildtools""" | 471 | """Find required utilities that aren't provided by the buildtools""" |
472 | sanity_required_utilities = (d.getVar('SANITY_REQUIRED_UTILITIES', True) or '').split() | 472 | sanity_required_utilities = (d.getVar('SANITY_REQUIRED_UTILITIES') or '').split() |
473 | sanity_required_utilities.append(d.expand('${BUILD_PREFIX}gcc')) | 473 | sanity_required_utilities.append(d.expand('${BUILD_PREFIX}gcc')) |
474 | sanity_required_utilities.append(d.expand('${BUILD_PREFIX}g++')) | 474 | sanity_required_utilities.append(d.expand('${BUILD_PREFIX}g++')) |
475 | buildtools_installer = os.path.join(d.getVar('SDK_DEPLOY', True), buildtools_fn) | 475 | buildtools_installer = os.path.join(d.getVar('SDK_DEPLOY'), buildtools_fn) |
476 | filelist, _ = bb.process.run('%s -l' % buildtools_installer) | 476 | filelist, _ = bb.process.run('%s -l' % buildtools_installer) |
477 | localdata = bb.data.createCopy(d) | 477 | localdata = bb.data.createCopy(d) |
478 | localdata.setVar('SDKPATH', '.') | 478 | localdata.setVar('SDKPATH', '.') |
479 | sdkpathnative = localdata.getVar('SDKPATHNATIVE', True) | 479 | sdkpathnative = localdata.getVar('SDKPATHNATIVE') |
480 | sdkbindirs = [localdata.getVar('bindir_nativesdk', True), | 480 | sdkbindirs = [localdata.getVar('bindir_nativesdk'), |
481 | localdata.getVar('sbindir_nativesdk', True), | 481 | localdata.getVar('sbindir_nativesdk'), |
482 | localdata.getVar('base_bindir_nativesdk', True), | 482 | localdata.getVar('base_bindir_nativesdk'), |
483 | localdata.getVar('base_sbindir_nativesdk', True)] | 483 | localdata.getVar('base_sbindir_nativesdk')] |
484 | for line in filelist.splitlines(): | 484 | for line in filelist.splitlines(): |
485 | splitline = line.split() | 485 | splitline = line.split() |
486 | if len(splitline) > 5: | 486 | if len(splitline) > 5: |
@@ -509,7 +509,7 @@ install_tools() { | |||
509 | # (they get populated from sstate on installation) | 509 | # (they get populated from sstate on installation) |
510 | unfsd_path="${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/unfsd" | 510 | unfsd_path="${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/unfsd" |
511 | if [ "${SDK_INCLUDE_TOOLCHAIN}" == "1" -a ! -e $unfsd_path ] ; then | 511 | if [ "${SDK_INCLUDE_TOOLCHAIN}" == "1" -a ! -e $unfsd_path ] ; then |
512 | binrelpath=${@os.path.relpath(d.getVar('STAGING_BINDIR_NATIVE',True), d.getVar('TOPDIR', True))} | 512 | binrelpath=${@os.path.relpath(d.getVar('STAGING_BINDIR_NATIVE',True), d.getVar('TOPDIR'))} |
513 | lnr ${SDK_OUTPUT}/${SDKPATH}/$binrelpath/unfsd $unfsd_path | 513 | lnr ${SDK_OUTPUT}/${SDKPATH}/$binrelpath/unfsd $unfsd_path |
514 | fi | 514 | fi |
515 | touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase | 515 | touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase |
@@ -611,8 +611,8 @@ SDK_INSTALL_TARGETS = "" | |||
611 | fakeroot python do_populate_sdk_ext() { | 611 | fakeroot python do_populate_sdk_ext() { |
612 | # FIXME hopefully we can remove this restriction at some point, but uninative | 612 | # FIXME hopefully we can remove this restriction at some point, but uninative |
613 | # currently forces this upon us | 613 | # currently forces this upon us |
614 | if d.getVar('SDK_ARCH', True) != d.getVar('BUILD_ARCH', True): | 614 | if d.getVar('SDK_ARCH') != d.getVar('BUILD_ARCH'): |
615 | bb.fatal('The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is set to %s (likely via setting SDKMACHINE) which is different from the architecture of the build machine (%s). Unable to continue.' % (d.getVar('SDK_ARCH', True), d.getVar('BUILD_ARCH', True))) | 615 | bb.fatal('The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is set to %s (likely via setting SDKMACHINE) which is different from the architecture of the build machine (%s). Unable to continue.' % (d.getVar('SDK_ARCH'), d.getVar('BUILD_ARCH'))) |
616 | 616 | ||
617 | d.setVar('SDK_INSTALL_TARGETS', get_sdk_install_targets(d)) | 617 | d.setVar('SDK_INSTALL_TARGETS', get_sdk_install_targets(d)) |
618 | buildtools_fn = get_current_buildtools(d) | 618 | buildtools_fn = get_current_buildtools(d) |
@@ -626,7 +626,7 @@ fakeroot python do_populate_sdk_ext() { | |||
626 | def get_ext_sdk_depends(d): | 626 | def get_ext_sdk_depends(d): |
627 | # Note: the deps varflag is a list not a string, so we need to specify expand=False | 627 | # Note: the deps varflag is a list not a string, so we need to specify expand=False |
628 | deps = d.getVarFlag('do_image_complete', 'deps', False) | 628 | deps = d.getVarFlag('do_image_complete', 'deps', False) |
629 | pn = d.getVar('PN', True) | 629 | pn = d.getVar('PN') |
630 | deplist = ['%s:%s' % (pn, dep) for dep in deps] | 630 | deplist = ['%s:%s' % (pn, dep) for dep in deps] |
631 | for task in ['do_image_complete', 'do_rootfs', 'do_build']: | 631 | for task in ['do_image_complete', 'do_rootfs', 'do_build']: |
632 | deplist.extend((d.getVarFlag(task, 'depends', True) or '').split()) | 632 | deplist.extend((d.getVarFlag(task, 'depends', True) or '').split()) |
@@ -637,7 +637,7 @@ python do_sdk_depends() { | |||
637 | # dependencies we don't need to (e.g. buildtools-tarball) and bringing those | 637 | # dependencies we don't need to (e.g. buildtools-tarball) and bringing those |
638 | # into the SDK's sstate-cache | 638 | # into the SDK's sstate-cache |
639 | import oe.copy_buildsystem | 639 | import oe.copy_buildsystem |
640 | sigfile = d.getVar('WORKDIR', True) + '/locked-sigs.inc' | 640 | sigfile = d.getVar('WORKDIR') + '/locked-sigs.inc' |
641 | oe.copy_buildsystem.generate_locked_sigs(sigfile, d) | 641 | oe.copy_buildsystem.generate_locked_sigs(sigfile, d) |
642 | } | 642 | } |
643 | addtask sdk_depends | 643 | addtask sdk_depends |
@@ -658,10 +658,10 @@ do_populate_sdk_ext[dirs] = "${@d.getVarFlag('do_populate_sdk', 'dirs', False)}" | |||
658 | 658 | ||
659 | do_populate_sdk_ext[depends] = "${@d.getVarFlag('do_populate_sdk', 'depends', False)} \ | 659 | do_populate_sdk_ext[depends] = "${@d.getVarFlag('do_populate_sdk', 'depends', False)} \ |
660 | buildtools-tarball:do_populate_sdk uninative-tarball:do_populate_sdk \ | 660 | buildtools-tarball:do_populate_sdk uninative-tarball:do_populate_sdk \ |
661 | ${@'meta-world-pkgdata:do_collect_packagedata' if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1' else ''} \ | 661 | ${@'meta-world-pkgdata:do_collect_packagedata' if d.getVar('SDK_INCLUDE_PKGDATA') == '1' else ''} \ |
662 | ${@'meta-extsdk-toolchain:do_locked_sigs' if d.getVar('SDK_INCLUDE_TOOLCHAIN', True) == '1' else ''}" | 662 | ${@'meta-extsdk-toolchain:do_locked_sigs' if d.getVar('SDK_INCLUDE_TOOLCHAIN') == '1' else ''}" |
663 | 663 | ||
664 | do_populate_sdk_ext[rdepends] += "${@' '.join([x + ':do_build' for x in d.getVar('SDK_TARGETS', True).split()])}" | 664 | do_populate_sdk_ext[rdepends] += "${@' '.join([x + ':do_build' for x in d.getVar('SDK_TARGETS').split()])}" |
665 | 665 | ||
666 | # Make sure code changes can result in rebuild | 666 | # Make sure code changes can result in rebuild |
667 | do_populate_sdk_ext[vardeps] += "copy_buildsystem \ | 667 | do_populate_sdk_ext[vardeps] += "copy_buildsystem \ |