mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 18:49:32 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
2251f712fc
commit
84ad12ead0
@@ -189,6 +189,7 @@ def main():
|
|||||||
add_help=False,
|
add_help=False,
|
||||||
epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
|
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('--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('-d', '--debug', help='Enable debug output', action='store_true')
|
||||||
parser.add_argument('-q', '--quiet', help='Print only errors', 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')
|
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)
|
scriptutils.logger_setup_color(logger, global_args.color)
|
||||||
|
|
||||||
tinfoil = setup_tinfoil(config_only=True)
|
if global_args.bbpath is None:
|
||||||
for path in ([scripts_path] +
|
tinfoil = setup_tinfoil(config_only=True)
|
||||||
tinfoil.config_data.getVar('BBPATH', True).split(':')):
|
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')
|
pluginpath = os.path.join(path, 'lib', 'devtool')
|
||||||
scriptutils.load_plugins(logger, plugins, pluginpath)
|
scriptutils.load_plugins(logger, plugins, pluginpath)
|
||||||
tinfoil.shutdown()
|
|
||||||
|
if tinfoil:
|
||||||
|
tinfoil.shutdown()
|
||||||
|
|
||||||
subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='<subcommand>')
|
subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='<subcommand>')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user