summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2015-07-31 08:19:13 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-01 22:24:12 +0100
commit84ad12ead09f01f3aec3e13df5f61abf7891f31f (patch)
treebf885b4fdee03398d0a4319f5d154f4f10926b73
parent2251f712fc32da4254b347940c41fbabcfb9d5b2 (diff)
downloadpoky-84ad12ead09f01f3aec3e13df5f61abf7891f31f.tar.gz
devtool: add --bbpath argument
(From OE-Core rev: a459b230387b34479212d54edeb3abf2b6274196) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/devtool15
1 files changed, 11 insertions, 4 deletions
diff --git a/scripts/devtool b/scripts/devtool
index 5d37d3b4a4..1c2243812a 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -189,6 +189,7 @@ def main():
189 add_help=False, 189 add_help=False,
190 epilog="Use %(prog)s <subcommand> --help to get help on a specific command") 190 epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
191 parser.add_argument('--basepath', help='Base directory of SDK / build directory') 191 parser.add_argument('--basepath', help='Base directory of SDK / build directory')
192 parser.add_argument('--bbpath', help='Explicitly specify the BBPATH, rather than getting it from the metadata')
192 parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true') 193 parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
193 parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true') 194 parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true')
194 parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR') 195 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():
239 240
240 scriptutils.logger_setup_color(logger, global_args.color) 241 scriptutils.logger_setup_color(logger, global_args.color)
241 242
242 tinfoil = setup_tinfoil(config_only=True) 243 if global_args.bbpath is None:
243 for path in ([scripts_path] + 244 tinfoil = setup_tinfoil(config_only=True)
244 tinfoil.config_data.getVar('BBPATH', True).split(':')): 245 global_args.bbpath = tinfoil.config_data.getVar('BBPATH', True)
246 else:
247 tinfoil = None
248
249 for path in [scripts_path] + global_args.bbpath.split(':'):
245 pluginpath = os.path.join(path, 'lib', 'devtool') 250 pluginpath = os.path.join(path, 'lib', 'devtool')
246 scriptutils.load_plugins(logger, plugins, pluginpath) 251 scriptutils.load_plugins(logger, plugins, pluginpath)
247 tinfoil.shutdown() 252
253 if tinfoil:
254 tinfoil.shutdown()
248 255
249 subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='<subcommand>') 256 subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='<subcommand>')
250 257