[OE-core] [PATCH 2/3] devtool: add --bbpath argument
Christopher Larson
kergoth at gmail.com
Wed Jul 29 21:54:13 UTC 2015
From: Christopher Larson <chris_larson at mentor.com>
Signed-off-by: Christopher Larson <chris_larson at mentor.com>
---
scripts/devtool | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/scripts/devtool b/scripts/devtool
index 557a830..4a1f2d6 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -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,13 +240,19 @@ 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.cooker.shutdown(force=True)
- tinfoil.cooker.unlockBitbake()
+
+ if tinfoil:
+ tinfoil.cooker.shutdown(force=True)
+ tinfoil.cooker.unlockBitbake()
subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='<subcommand>')
--
2.2.1
More information about the Openembedded-core
mailing list