diff options
Diffstat (limited to 'bitbake')
| -rwxr-xr-x | bitbake/bin/bitbake-layers | 14 | ||||
| -rw-r--r-- | bitbake/lib/bblayers/action.py | 4 |
2 files changed, 12 insertions, 6 deletions
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers index d4b1d1aaf2..aebb5100c2 100755 --- a/bitbake/bin/bitbake-layers +++ b/bitbake/bin/bitbake-layers | |||
| @@ -33,7 +33,7 @@ def main(): | |||
| 33 | add_help=False) | 33 | add_help=False) |
| 34 | parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true') | 34 | parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true') |
| 35 | parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true') | 35 | parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true') |
| 36 | parser.add_argument('-F', '--force', help='Force add without recipe parse verification', action='store_true') | 36 | parser.add_argument('-F', '--force', help='Forced execution: can be specified multiple times. -F will force add without recipe parse verification and -FF will additionally force the run withput layer parsing.', action='count', default=0) |
| 37 | parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR') | 37 | parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR') |
| 38 | 38 | ||
| 39 | global_args, unparsed_args = parser.parse_known_args() | 39 | global_args, unparsed_args = parser.parse_known_args() |
| @@ -59,16 +59,20 @@ def main(): | |||
| 59 | plugins = [] | 59 | plugins = [] |
| 60 | tinfoil = bb.tinfoil.Tinfoil(tracking=True) | 60 | tinfoil = bb.tinfoil.Tinfoil(tracking=True) |
| 61 | tinfoil.logger.setLevel(logger.getEffectiveLevel()) | 61 | tinfoil.logger.setLevel(logger.getEffectiveLevel()) |
| 62 | try: | 62 | if global_args.force > 1: |
| 63 | bbpaths = [] | ||
| 64 | else: | ||
| 63 | tinfoil.prepare(True) | 65 | tinfoil.prepare(True) |
| 64 | for path in ([topdir] + | 66 | bbpaths = tinfoil.config_data.getVar('BBPATH').split(':') |
| 65 | tinfoil.config_data.getVar('BBPATH').split(':')): | 67 | |
| 68 | try: | ||
| 69 | for path in ([topdir] + bbpaths): | ||
| 66 | pluginpath = os.path.join(path, 'lib', 'bblayers') | 70 | pluginpath = os.path.join(path, 'lib', 'bblayers') |
| 67 | bb.utils.load_plugins(logger, plugins, pluginpath) | 71 | bb.utils.load_plugins(logger, plugins, pluginpath) |
| 68 | 72 | ||
| 69 | registered = False | 73 | registered = False |
| 70 | for plugin in plugins: | 74 | for plugin in plugins: |
| 71 | if hasattr(plugin, 'tinfoil_init'): | 75 | if hasattr(plugin, 'tinfoil_init') and global_args.force <= 1: |
| 72 | plugin.tinfoil_init(tinfoil) | 76 | plugin.tinfoil_init(tinfoil) |
| 73 | if hasattr(plugin, 'register_commands'): | 77 | if hasattr(plugin, 'register_commands'): |
| 74 | registered = True | 78 | registered = True |
diff --git a/bitbake/lib/bblayers/action.py b/bitbake/lib/bblayers/action.py index a8f2699335..a14f19948e 100644 --- a/bitbake/lib/bblayers/action.py +++ b/bitbake/lib/bblayers/action.py | |||
| @@ -50,8 +50,8 @@ class ActionPlugin(LayerPlugin): | |||
| 50 | 50 | ||
| 51 | try: | 51 | try: |
| 52 | notadded, _ = bb.utils.edit_bblayers_conf(bblayers_conf, layerdirs, None) | 52 | notadded, _ = bb.utils.edit_bblayers_conf(bblayers_conf, layerdirs, None) |
| 53 | self.tinfoil.modified_files() | ||
| 54 | if not (args.force or notadded): | 53 | if not (args.force or notadded): |
| 54 | self.tinfoil.modified_files() | ||
| 55 | try: | 55 | try: |
| 56 | self.tinfoil.run_command('parseConfiguration') | 56 | self.tinfoil.run_command('parseConfiguration') |
| 57 | except (bb.tinfoil.TinfoilUIException, bb.BBHandledException): | 57 | except (bb.tinfoil.TinfoilUIException, bb.BBHandledException): |
| @@ -83,6 +83,8 @@ class ActionPlugin(LayerPlugin): | |||
| 83 | layerdir = os.path.abspath(item) | 83 | layerdir = os.path.abspath(item) |
| 84 | layerdirs.append(layerdir) | 84 | layerdirs.append(layerdir) |
| 85 | (_, notremoved) = bb.utils.edit_bblayers_conf(bblayers_conf, None, layerdirs) | 85 | (_, notremoved) = bb.utils.edit_bblayers_conf(bblayers_conf, None, layerdirs) |
| 86 | if args.force > 1: | ||
| 87 | return 0 | ||
| 86 | self.tinfoil.modified_files() | 88 | self.tinfoil.modified_files() |
| 87 | if notremoved: | 89 | if notremoved: |
| 88 | for item in notremoved: | 90 | for item in notremoved: |
