| Summary: | "bitbake-layers remove-layer" does not work when there is a missing layer dependencies | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Yoann Congal <yoann.congal> |
| Component: | bitbake | Assignee: | Simone Weiß <simone.p.weiss> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | pavel, poky.bs.watcher, poky.watcher, randy.macleod, simone.p.weiss, tim.orling, yoann.congal |
| Version: | unspecified | ||
| Target Milestone: | 5.0 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
|
Description
Yoann Congal
2024-03-03 23:00:54 UTC
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 |