return targetpath
-def register_command(subparsers):
+def register_commands(subparsers):
common = argparse.ArgumentParser(add_help=False)
common.add_argument('-m', '--machine', help='Make bbappend changes specific to a machine only', metavar='MACHINE')
common.add_argument('-w', '--wildcard-version', help='Use wildcard to make the bbappend apply to any recipe version', action='store_true')
return values
-def register_command(subparsers):
+def register_commands(subparsers):
parser_create = subparsers.add_parser('create',
help='Create a new recipe',
description='Creates a new recipe from a source tree')
print(append_path)
-def register_command(subparsers):
+def register_commands(subparsers):
parser = subparsers.add_parser('newappend',
help='Create a bbappend for the specified target in the specified layer')
parser.add_argument('-w', '--wildcard-version', help='Use wildcard to make the bbappend apply to any recipe version', action='store_true')
return 0
-def register_command(subparsers):
+def register_commands(subparsers):
parser_setvar = subparsers.add_parser('setvar',
help='Set a variable within a recipe',
description='Adds/updates the value a variable is set to in a recipe')
registered = False
for plugin in plugins:
- if hasattr(plugin, 'register_command'):
+ if hasattr(plugin, 'register_commands'):
+ registered = True
+ plugin.register_commands(subparsers)
+ elif hasattr(plugin, 'register_command'):
+ # Legacy function name
registered = True
plugin.register_command(subparsers)
if hasattr(plugin, 'tinfoil_init'):