Fix a couple populate_sdk_ext issues
v2 cover Fix a couple populate_sdk_ext issues
From: Christopher Larson <[email protected]>
- Explicitly pass BBPATH to devtool as Paul Eggleton suggests, to avoid needing to acquire the bitbake lock, to resolve the issue in populate_sdk_ext.
- Use the oe-core lnr script rather than ln -sr to improve host portability (not all hosts have recent coreutils).
[v2 changes]: rebased on Paul's commit to use tinfoil.shutdown() which while not yet on master, is pending on master-next.
The following changes since commit dd5c87900b73bf44cf96735706d7d06e56b4d20e:
oeqa/commands: Increase qemu boot timeout to match testimage.bbclass (2015-07-31 15:58:55 +0100)
are available in the git repository at:
[email protected]:kergoth/openembedded-core populate_sdk_ext-fixes
for you to fetch changes up to ccf0ba3cb9507e1d0057bd55eeed8275711e1c0d:
populate_sdk_ext: pass BBPATH to devtool --bbpath (2015-07-31 08:15:01 -0700)
----------------------------------------------------------------
Christopher Larson (3):
populate_sdk_ext: use lnr, not ln -sr, for portability
devtool: add --bbpath argument
populate_sdk_ext: pass BBPATH to devtool --bbpathmeta/classes/populate_sdk_ext.bbclass | 7 ++++--- scripts/devtool | 15 +++++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-)
Signature · 1 line
2.2.1
PATCH v2 1/3 populate_sdk_ext: use lnr, not ln -sr, for portability
From: Christopher Larson <[email protected]>
Not all hosts are running sufficiently new coreutils.
--- meta/classes/populate_sdk_ext.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/populate_sdk_ext.bbclass +2 -2
@@ -164,8 +164,8 @@ python copy_buildsystem () { install_tools() { install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk} - ln -sr ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/devtool ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/devtool - ln -sr ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/recipetool ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/recipetool + lnr ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/devtool ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/devtool + lnr ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/recipetool ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/recipetool touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase install ${SDK_DEPLOY}/${DISTRO}-${TCLIBC}-${SDK_ARCH}-buildtools-tarball-${TUNE_PKGARCH}-buildtools-nativesdk-standalone-${DISTRO_VERSION}.sh ${SDK_OUTPUT}/${SDKPATH}
Signature · 1 line
2.2.1
PATCH v2 2/3 devtool: add --bbpath argument
From: Christopher Larson <[email protected]>
--- scripts/devtool | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
scripts/devtool +11 -4
@@ -189,6 +189,7 @@ def main(): add_help=False, epilog="Use %(prog)s <subcommand> --help to get help on a specific command") parser.add_argument('--basepath', help='Base directory of SDK / build directory') + parser.add_argument('--bbpath', help='Explicitly specify the BBPATH, rather than getting it from the metadata') parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true') parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true') parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR')
@@ -239,12 +240,18 @@ def main(): scriptutils.logger_setup_color(logger, global_args.color) - tinfoil = setup_tinfoil(config_only=True) - for path in ([scripts_path] + - tinfoil.config_data.getVar('BBPATH', True).split(':')): + if global_args.bbpath is None: + tinfoil = setup_tinfoil(config_only=True) + global_args.bbpath = tinfoil.config_data.getVar('BBPATH', True) + else: + tinfoil = None + + for path in [scripts_path] + global_args.bbpath.split(':'): pluginpath = os.path.join(path, 'lib', 'devtool') scriptutils.load_plugins(logger, plugins, pluginpath) - tinfoil.shutdown() + + if tinfoil: + tinfoil.shutdown() subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='<subcommand>')
Signature · 1 line
2.2.1
PATCH v2 3/3 populate_sdk_ext: pass BBPATH to devtool --bbpath
In reply to Christopher LarsonFrom: Christopher Larson <[email protected]>
--- meta/classes/populate_sdk_ext.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/populate_sdk_ext.bbclass +2 -1
@@ -88,7 +88,8 @@ python copy_buildsystem () { config.write(f) # Create a layer for new recipes / appends - bb.process.run("devtool --basepath %s create-workspace --create-only %s" % (baseoutpath, os.path.join(baseoutpath, 'workspace'))) + bbpath = d.getVar('BBPATH', True) + bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')]) # Create bblayers.conf bb.utils.mkdirhier(baseoutpath + '/conf')
Signature · 1 line
2.2.1