Extensible SDK improvements
cover Extensible SDK improvements
Some tweaks and minor fixes for the extensible SDK.
The following changes since commit 2a1edfd9cfa16ec334c0758b47677d4fee5e79a8:
bitbake.conf: Add filename and lineno to BB_SIGNATURE_EXCLUDE_FLAGS (2015-12-22 00:01:31 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/extsdkfixes3-oe
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/extsdkfixes3-oe
Paul Eggleton (5):
classes/populate_sdk_ext: use uninative to set NATIVELSBSTRING classes/base: don't print header if BUILDCFG_HEADER not set classes/populate_sdk_ext: hide build configuration in devtool build* output classes/populate_sdk_ext: error out of install if buildtools install fails
devtool: sdk-update: fix traceback without update server set
meta/classes/base.bbclass | 3 ++- meta/classes/populate_sdk_ext.bbclass | 12 ++++++------ scripts/lib/devtool/sdk.py | 6 +----- 3 files changed, 9 insertions(+), 12 deletions(-)
Signature · 1 line
2.5.0
PATCH 1/5 classes/populate_sdk_ext: use uninative to set NATIVELSBSTRING
We inherit uninative in the extensible SDK configuration, and uninative sets NATIVELSBSTRING to a fixed value, so we don't need to force the value ourselves.
Fixes [YOCTO #8662].
--- meta/classes/populate_sdk_ext.bbclass | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
meta/classes/populate_sdk_ext.bbclass +2 -5
@@ -149,11 +149,6 @@ python copy_buildsystem () { # Bypass the default connectivity check if any f.write('CONNECTIVITY_CHECK_URIS = ""\n\n') - # Another hack, but we want the native part of sstate to be kept the same - # regardless of the host distro - fixedlsbstring = 'SDK-Fixed' - f.write('NATIVELSBSTRING_forcevariable = "%s"\n\n' % fixedlsbstring) - # Ensure locked sstate cache objects are re-used without error f.write('SIGGEN_LOCKEDSIGS_CHECK_LEVEL = "warn"\n\n')
@@ -180,6 +175,8 @@ python copy_buildsystem () { sstate_out = baseoutpath + '/sstate-cache' bb.utils.remove(sstate_out, True) + # uninative.bbclass sets NATIVELSBSTRING to 'universal' + fixedlsbstring = 'universal' oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_pruned, d.getVar('SSTATE_DIR', True), sstate_out, d,
Signature · 1 line
2.5.0
PATCH 2/5 classes/base: don't print header if BUILDCFG_HEADER not set
In reply to Paul EggletonIf we don't want a header printed at the start of task execution (which we'd prefer not to within the extensible SDK) we can accomplish that by clearing BUILDCFG_VARS and BUILDCFG_HEADER, but that was still printing a load of blank lines. To keep things simple, check if BUILDCFG_HEADER is set to something before printing a header.
--- meta/classes/base.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/base.bbclass +2 -1
@@ -230,7 +230,8 @@ python base_eventhandler() { statuslines.extend(flines) statusheader = e.data.getVar('BUILDCFG_HEADER', True) - bb.plain('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines))) + if statusheader: + bb.plain('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines))) # This code is to silence warnings where the SDK variables overwrite the # target ones and we'd see dulpicate key names overwriting each other
Signature · 1 line
2.5.0
PATCH 3/5 classes/populate_sdk_ext: hide build configuration in devtool build* output
In reply to Paul EggletonThe configuration of the build system within the extensible SDK is fixed, so there's not a lot of point in showing it; plus it just gets in the way of the output that's interesting to the user in this context. So let's hide it within the extensible SDK.
--- meta/classes/populate_sdk_ext.bbclass | 3 +++ 1 file changed, 3 insertions(+)
meta/classes/populate_sdk_ext.bbclass +3 -0
@@ -152,6 +152,9 @@ python copy_buildsystem () { # Ensure locked sstate cache objects are re-used without error f.write('SIGGEN_LOCKEDSIGS_CHECK_LEVEL = "warn"\n\n') + # Hide the config information from bitbake output (since it's fixed within the SDK) + f.write('BUILDCFG_HEADER = ""\n') + # If you define a sdk_extraconf() function then it can contain additional config extraconf = (d.getVar('sdk_extraconf', True) or '').strip() if extraconf:
Signature · 1 line
2.5.0
PATCH 4/5 classes/populate_sdk_ext: error out of install if buildtools install fails
In reply to Paul EggletonIf the installation of buildtools fails then we should fail the entire installation instead of blindly continuing on.
--- meta/classes/populate_sdk_ext.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/populate_sdk_ext.bbclass +1 -1
@@ -219,7 +219,7 @@ SDK_PRE_INSTALL_COMMAND_task-populate-sdk-ext = "${sdk_ext_preinst}" sdk_ext_postinst() { printf "\nExtracting buildtools...\n" cd $target_sdk_dir - printf "buildtools\ny" | ./*buildtools-nativesdk-standalone* > /dev/null + printf "buildtools\ny" | ./*buildtools-nativesdk-standalone* > /dev/null || ( printf 'ERROR: buildtools installation failed\n' ; exit 1 ) # Make sure when the user sets up the environment, they also get # the buildtools-tarball tools in their path.
Signature · 1 line
2.5.0
PATCH 5/5 devtool: sdk-update: fix traceback without update server set
In reply to Paul EggletonIf the SDK update server hasn't been set in the config (when building the extensible SDK this would be set via SDK_UPDATE_URL) and it wasn't specified on the command line then we were failing with a traceback because we didn't pass the default value properly - None is interpreted as no default, meaning raise an exception if no such option exists.
Additionally we don't need the try...except anymore either because with a proper default value, NoSectionError is caught as well.
--- scripts/lib/devtool/sdk.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
scripts/lib/devtool/sdk.py +1 -5
@@ -81,13 +81,9 @@ def install_sstate_objects(sstate_objects, src_sdk, dest_sdk): def sdk_update(args, config, basepath, workspace): # Fetch locked-sigs.inc file from remote/local destination - from ConfigParser import NoSectionError updateserver = args.updateserver if not updateserver: - try: - updateserver = config.get('SDK', 'updateserver', None) - except NoSectionError: - pass + updateserver = config.get('SDK', 'updateserver', '') if not updateserver: raise DevtoolError("Update server not specified in config file, you must specify it on the command line") logger.debug("updateserver: %s" % args.updateserver)
Signature · 1 line
2.5.0