For example, you added meta-networking before it depended on meta-python[0]: When you try to remove meta-networking, "bitbake-layers remove-layer" displays an error and does not remove the layer from bblayer.conf: $ bitbake-layers remove-layer ../meta-openembedded/meta-networking NOTE: Starting bitbake server... ERROR: Layer 'networking-layer' depends on layer 'meta-python', but this layer is not enabled in your configuration Maybe an option -f/--force is missing to ignore such dependency error and forcibly remove the layer from bblayer.conf ? NB: This was triggered on the AB[1] which add/remove layers for each layers of meta-openembedded. [0]: https://git.openembedded.org/meta-openembedded/commit/?id=ab7c469bfeb7aba97402d8eab03d9bb18725c6af [1]: https://autobuilder.yoctoproject.org/typhoon/#/builders/155/builds/14/steps/30/logs/stdio
I'm willing to wager that "bitbake-layers layerindex-fetch meta-networking" would work however ;)
There is already a --force option for bitbake-layers. It ignores the recipe parse verification when adding layers. I will how to add it for remove as well
(In reply to Tim Orling from comment #1) > I'm willing to wager that "bitbake-layers layerindex-fetch meta-networking" > would work however ;) Actually not :)
(In reply to Simone Weiß from comment #3) > (In reply to Tim Orling from comment #1) > > I'm willing to wager that "bitbake-layers layerindex-fetch meta-networking" > > would work however ;) > > Actually not :) Only because meta-openembedded hasn't branched for scarthgap yet. bibake-layers layerindex-fetch --branch master meta-networking is just fine.
This would maybe do, but feels too messy for me diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers index d4b1d1aaf2..78c316fff7 100755 --- a/bitbake/bin/bitbake-layers +++ b/bitbake/bin/bitbake-layers @@ -34,6 +34,7 @@ def main(): 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('-F', '--force', help='Force add without recipe parse verification', action='store_true') + parser.add_argument('-T', '--notinfoil', help='Force run without tinfoil, this might fail.', action='store_true') parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR') global_args, unparsed_args = parser.parse_known_args() @@ -59,16 +60,21 @@ def main(): plugins = [] tinfoil = bb.tinfoil.Tinfoil(tracking=True) tinfoil.logger.setLevel(logger.getEffectiveLevel()) - try: + if global_args.notinfoil: + bbpath_string = [] + else: tinfoil.prepare(True) - for path in ([topdir] + - tinfoil.config_data.getVar('BBPATH').split(':')): + bbpath_string = tinfoil.config_data.getVar('BBPATH').split(':') + print(bbpath_string) + + try: + for path in ([topdir] + bbpath_string): pluginpath = os.path.join(path, 'lib', 'bblayers') bb.utils.load_plugins(logger, plugins, pluginpath) - registered = False + for plugin in plugins: - if hasattr(plugin, 'tinfoil_init'): + if hasattr(plugin, 'tinfoil_init') and not global_args.notinfoil: plugin.tinfoil_init(tinfoil) if hasattr(plugin, 'register_commands'): registered = True
(In reply to Simone Weiß from comment #5) > This would maybe do, but feels too messy for me > diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers > index d4b1d1aaf2..78c316fff7 100755 > --- a/bitbake/bin/bitbake-layers > +++ b/bitbake/bin/bitbake-layers > @@ -34,6 +34,7 @@ def main(): > 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('-F', '--force', help='Force add without recipe > parse verification', action='store_true') > + parser.add_argument('-T', '--notinfoil', help='Force run without > tinfoil, this might fail.', action='store_true') > parser.add_argument('--color', choices=['auto', 'always', 'never'], > default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', > metavar='COLOR') > > global_args, unparsed_args = parser.parse_known_args() > @@ -59,16 +60,21 @@ def main(): > plugins = [] > tinfoil = bb.tinfoil.Tinfoil(tracking=True) > tinfoil.logger.setLevel(logger.getEffectiveLevel()) > - try: > + if global_args.notinfoil: > + bbpath_string = [] > + else: > tinfoil.prepare(True) > - for path in ([topdir] + > - tinfoil.config_data.getVar('BBPATH').split(':')): > + bbpath_string = tinfoil.config_data.getVar('BBPATH').split(':') > + print(bbpath_string) > + > + try: > + for path in ([topdir] + bbpath_string): > pluginpath = os.path.join(path, 'lib', 'bblayers') > bb.utils.load_plugins(logger, plugins, pluginpath) > - > registered = False > + > for plugin in plugins: > - if hasattr(plugin, 'tinfoil_init'): > + if hasattr(plugin, 'tinfoil_init') and not > global_args.notinfoil: > plugin.tinfoil_init(tinfoil) > if hasattr(plugin, 'register_commands'): > registered = True And then also using this in bitbake/lib/bblayers/action.py for adding and removing...
This is even worse. $ bitbake-layers add-layer ../../sources/meta-openembedded/meta-python/ NOTE: Starting bitbake server... ERROR: Layer 'networking-layer' depends on layer 'meta-python', but this layer is not enabled in your configuration