| Summary: | bitbake-layers allows adding invalid layer configuration | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Ross Burton <ross.burton> |
| Component: | bitbake | Assignee: | Richard Purdie <richard.purdie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | poky.bs.watcher, poky.watcher, randy.macleod |
| Version: | 3.3 | ||
| Target Milestone: | 3.3 M3 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
The issue is that it probably can't validate it without writing it, then the exception causes the rollback to fail? I see something a little different: richard@jet$ bitbake-layers add-layer ../meta-arm/meta-arm NOTE: Starting bitbake server... richard@jet$ bitbake show-layers ERROR: Layer 'meta-arm' depends on layer 'arm-toolchain', but this layer is not enabled in your configuration which release was this with? Obviously that should be "bitbake-layers show-layers" but it was confusing as the wrong command was showing me the error I wanted! Fixed with: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=7283a0b3b6ca49d0d2e13593333a580ef10439a8 http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=df90345d33730003300159e0c3e55c0efc61c7c2 so now the layer is not added if dependencies are not met. |
'bitbake-layers add-layer' doesn't validate the layer configuration before writing it: $ bitbake-layers show-layers NOTE: Starting bitbake server... layer path priority ========================================================================== meta /home/ross/Yocto/poky/meta 5 meta-poky /home/ross/Yocto/poky/meta-poky 5 meta-yocto-bsp /home/ross/Yocto/poky/meta-yocto-bsp 5 $ bitbake-layers add-layer ~/Yocto/meta-arm/meta-arm NOTE: Starting bitbake server... $ bitbake-layers show-layers NOTE: Starting bitbake server... Traceback (most recent call last): File "/home/ross/Yocto/poky/bitbake/bin/bitbake-layers", line 95, in <module> ret = main() File "/home/ross/Yocto/poky/bitbake/bin/bitbake-layers", line 63, in main tinfoil.prepare(True) File "/home/ross/Yocto/poky/bitbake/lib/bb/tinfoil.py", line 410, in prepare self.run_command('parseConfiguration') File "/home/ross/Yocto/poky/bitbake/lib/bb/tinfoil.py", line 466, in run_command raise TinfoilCommandFailed(result[1]) bb.tinfoil.TinfoilCommandFailed: Traceback (most recent call last): File "/home/ross/Yocto/poky/bitbake/lib/bb/command.py", line 81, in runCommand result = command_method(self, commandline) File "/home/ross/Yocto/poky/bitbake/lib/bb/command.py", line 281, in parseConfiguration command.cooker.parseConfiguration() File "/home/ross/Yocto/poky/bitbake/lib/bb/cooker.py", line 426, in parseConfiguration self.handleCollections(self.data.getVar("BBFILE_COLLECTIONS")) File "/home/ross/Yocto/poky/bitbake/lib/bb/cooker.py", line 1255, in handleCollections raise CollectionError("Errors during parsing layer configuration") bb.cooker.CollectionError: Errors during parsing layer configuration The actual error (not visible, see bug 13183) is that meta-arm depends on meta-arm-toolchain. This should have prevented adding meta-arm to the layers.