extsdk bug fixes
cover extsdk bug fixes
These are bug fixes for bugs found during installation of the ext sdk. The following changes since commit bc72f64eb4041ef44198e3e0caeb2be9f43eb44e:
linux-yocto: Update SRCREV for genericx86* for 4.4 (2016-02-11 22:58:38 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib 941d876fe835bc1aa26039d0edec9573d482bca3
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=941d876fe835bc1aa26039d0edec9573d482bca3
Randy Witt (3):
populate_sdk_ext: Don't ignore SDK_TARGETS value
devtool: Don't recursively look for .devtoolbase in --basepath populate_sdk_ext.bbclass: Add SDK_RECRDEP_TASKS variable
meta/classes/populate_sdk_ext.bbclass | 15 +++++++++++++-- scripts/devtool | 28 ++++++++++++++++------------ 2 files changed, 29 insertions(+), 14 deletions(-)
Signature · 1 line
2.5.0
PATCH 1/3 populate_sdk_ext: Don't ignore SDK_TARGETS value
This fixes a problem where SDK_INSTALL_TARGETS wouldn't pick up the value in SDK_TARGETS. It also removes the inline python to make the code more readable.
--- meta/classes/populate_sdk_ext.bbclass | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
meta/classes/populate_sdk_ext.bbclass +12 -1
@@ -32,7 +32,18 @@ SDK_INHERIT_BLACKLIST ?= "buildhistory icecc" SDK_UPDATE_URL ?= "" SDK_TARGETS ?= "${PN}" -SDK_INSTALL_TARGETS = "${@SDK_TARGETS if d.getVar('SDK_EXT_TYPE', True) != 'minimal' else ''} ${@'meta-world-pkgdata:do_allpackagedata' if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1' else ''}" + +def get_sdk_install_targets(d): + sdk_install_targets = '' + if d.getVar('SDK_EXT_TYPE', True) != 'minimal': + sdk_install_targets = d.getVar('SDK_TARGETS', True) + + if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1': + sdk_install_targets += ' meta-world-pkgdata:do_allpackagedata' + + return sdk_install_targets + +SDK_INSTALL_TARGETS = "${@get_sdk_install_targets(d)}" OE_INIT_ENV_SCRIPT ?= "oe-init-build-env" # The files from COREBASE that you want preserved in the COREBASE copied
Signature · 1 line
2.5.0
PATCH 2/3 devtool: Don't recursively look for .devtoolbase in --basepath
In reply to Randy WittIf the user specifies --basepath on the commandline, only the directory specified should be searched for .devtoolbase. Otherwise when --basepath is a child of the sdk directory, .devtoolbase will always be found and devtool will only show options meant to be used within an sdk.
--- scripts/devtool | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-)
scripts/devtool +16 -12
@@ -192,13 +192,6 @@ def main(): # Default basepath basepath = os.path.dirname(os.path.abspath(__file__)) - pth = basepath - while pth != '' and pth != os.sep: - if os.path.exists(os.path.join(pth, '.devtoolbase')): - context.fixed_setup = True - basepath = pth - break - pth = os.path.dirname(pth) parser = argparse_oe.ArgumentParser(description="OpenEmbedded development tool", add_help=False,
@@ -224,11 +217,22 @@ def main(): if global_args.basepath: # Override basepath = global_args.basepath - elif not context.fixed_setup: - basepath = os.environ.get('BUILDDIR') - if not basepath: - logger.error("This script can only be run after initialising the build environment (e.g. by using oe-init-build-env)") - sys.exit(1) + if os.path.exists(os.path.join(basepath, '.devtoolbase')): + context.fixed_setup = True + else: + pth = basepath + while pth != '' and pth != os.sep: + if os.path.exists(os.path.join(pth, '.devtoolbase')): + context.fixed_setup = True + basepath = pth + break + pth = os.path.dirname(pth) + + if not context.fixed_setup: + basepath = os.environ.get('BUILDDIR') + if not basepath: + logger.error("This script can only be run after initialising the build environment (e.g. by using oe-init-build-env)") + sys.exit(1) logger.debug('Using basepath %s' % basepath)
Signature · 1 line
2.5.0
PATCH 3/3 populate_sdk_ext.bbclass: Add SDK_RECRDEP_TASKS variable
In reply to Randy WittCurrently there isn't a way for the extensible sdk to know all the tasks that will need sstate for an image. This is because a layer can add it's on custom tasks that are required for an image to be generated.
The extensible sdk solved this for poky by using recrdeptask and specifying the tasks known to be required for the image as well as for building new recipes.
So the SDK_RECRDEP_TASKS variable allows a user to specify additional tasks that need to be pulled in.
--- meta/classes/populate_sdk_ext.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/populate_sdk_ext.bbclass +1 -1
@@ -359,7 +359,7 @@ addtask sdk_depends do_sdk_depends[dirs] = "${WORKDIR}" do_sdk_depends[depends] = "${@get_ext_sdk_depends(d)}" do_sdk_depends[recrdeptask] = "${@d.getVarFlag('do_populate_sdk', 'recrdeptask', False)}" -do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy" +do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy ${SDK_RECRDEP_TASKS}" do_sdk_depends[rdepends] = "${@get_sdk_ext_rdepends(d)}" def get_sdk_ext_rdepends(d):
Signature · 1 line
2.5.0
Re: [PATCH 3/3] populate_sdk_ext.bbclass: Add SDK_RECRDEP_TASKS variable
Quoted 35 lines · Randy Witt
Currently there isn't a way for the extensible sdk to know all the tasks
that will need sstate for an image. This is because a layer can add it's
on custom tasks that are required for an image to be generated.The extensible sdk solved this for poky by using recrdeptask and specifying the tasks known to be required for the image as well as for
building new recipes.So the
SDK_RECRDEP_TASKSvariable allows a user to specify additional tasks that need to be pulled in.Signed-off-by Randy Witt <[email protected]>--- meta/classes/populate_sdk_ext.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/populate_sdk_ext.bbclass +0
-0@@ -359,7 +359,7 @@ addtask sdk_depends do_sdk_depends[dirs] = "${WORKDIR}" do_sdk_depends[depends] = "${@get_ext_sdk_depends(d)}" do_sdk_depends[recrdeptask] = "${@d.getVarFlag('do_populate_sdk','recrdeptask', False)}"
-do_sdk_depends[recrdeptask] += "do_populate_licdo_package_qado_populate_sysrootdo_deploy" +do_sdk_depends[recrdeptask] += "do_populate_licdo_package_qado_populate_sysrootdo_deploy${SDK_RECRDEP_TASKS}"
do_sdk_depends[rdepends] = "${@get_sdk_ext_rdepends(d)}"
Quoted 1 line
def
get_sdk_ext_rdepends(d):
Doesn't this need a default value or it will throw parse failures?
Cheers,
Richard
Re: [PATCH 3/3] populate_sdk_ext.bbclass: Add SDK_RECRDEP_TASKS variable
Quoted 36 lines · Richard Purdie
Quoted 35 lines · Randy Witt
Currently there isn't a way for the extensible sdk to know all the tasks
that will need sstate for an image. This is because a layer can add it's
on custom tasks that are required for an image to be generated.The extensible sdk solved this for poky by using recrdeptask and specifying the tasks known to be required for the image as well as for
building new recipes.So the
SDK_RECRDEP_TASKSvariable allows a user to specify additional tasks that need to be pulled in.Signed-off-by Randy Witt <[email protected]>--- meta/classes/populate_sdk_ext.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/populate_sdk_ext.bbclass +0
-0@@ -359,7 +359,7 @@ addtask sdk_depends do_sdk_depends[dirs] = "${WORKDIR}" do_sdk_depends[depends] = "${@get_ext_sdk_depends(d)}" do_sdk_depends[recrdeptask] = "${@d.getVarFlag('do_populate_sdk','recrdeptask', False)}"
-do_sdk_depends[recrdeptask] += "do_populate_licdo_package_qado_populate_sysrootdo_deploy" +do_sdk_depends[recrdeptask] += "do_populate_licdo_package_qado_populate_sysrootdo_deploy${SDK_RECRDEP_TASKS}"
do_sdk_depends[rdepends] = "${@get_sdk_ext_rdepends(d)}"
Quoted 3 lines
Quoted 1 line
def
get_sdk_ext_rdepends(d):Doesn't this need a default value or it will throw parse failures?
Actually, it didn't generate parse errors. My guess is it just didn't expand it and put a bogus task in the list. So I'll send a v2.
Quoted 5 lines
Cheers,
Richard
PATCH v2 3/3 populate_sdk_ext.bbclass: Add SDK_RECRDEP_TASKS variable
In reply to Randy WittCurrently there isn't a way for the extensible sdk to know all the tasks that will need sstate for an image. This is because a layer can add it's on custom tasks that are required for an image to be generated.
The extensible sdk solved this for poky by using recrdeptask and specifying the tasks known to be required for the image as well as for building new recipes.
So the SDK_RECRDEP_TASKS variable allows a user to specify additional tasks that need to be pulled in.
--- meta/classes/populate_sdk_ext.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/classes/populate_sdk_ext.bbclass +3 -1
@@ -21,6 +21,8 @@ SDK_EXT_task-populate-sdk-ext = "-ext" # Options are full or minimal SDK_EXT_TYPE ?= "full" +SDK_RECRDEP_TASKS ?= "" + SDK_LOCAL_CONF_WHITELIST ?= "" SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \ BB_NUMBER_THREADS \
@@ -359,7 +361,7 @@ addtask sdk_depends do_sdk_depends[dirs] = "${WORKDIR}" do_sdk_depends[depends] = "${@get_ext_sdk_depends(d)}" do_sdk_depends[recrdeptask] = "${@d.getVarFlag('do_populate_sdk', 'recrdeptask', False)}" -do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy" +do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy ${SDK_RECRDEP_TASKS}" do_sdk_depends[rdepends] = "${@get_sdk_ext_rdepends(d)}" def get_sdk_ext_rdepends(d):
Signature · 1 line
2.5.0