build: inherit logging in base.bbclass; drop redundant per-recipe inherits#299
Merged
Conversation
…erits Follow-up to #298. do_attach_infrabase (like other base.bbclass shell tasks) uses bbwarn/bbfatal, but base.bbclass did not inherit logging. In recipes that don't inherit it themselves — the fetched trees qemu/avz/uboot — those helpers were undefined, so the attach guard's dirty branch exited 127 (command not found), turning a diagnostic into a silent hard failure. #298 worked around it with plain echo; the proper fix, matching upstream OE, is to inherit logging in base so the bb* shell helpers are available in every recipe. do_attach_infrabase then uses the idiomatic bbwarn/bbfatal again, and the now-redundant per-recipe 'inherit logging' lines are removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #298.
Problem
do_attach_infrabase(and otherbase.bbclassshell tasks) usebbwarn/bbfatal, butbase.bbclassdid notinherit logging. In recipes that don't inherit it themselves — the fetched trees (qemu, avz, uboot) — those helpers are undefined, so the attach guard's "local modifications" branch exits 127 (command not found), turning a diagnostic warning into a silent hard task failure with no message.This surfaced while validating a QEMU bbappend: a stale
qemu.attach.sha256(a known false positive) tripped the branch, and the build died onbbwarn: command not foundinstead of printing the intended guidance.Fix
inherit logginginbase.bbclass, matching upstream OpenEmbedded. Sincebaseis inherited by every recipe, thebb*shell logging helpers are now available everywhere.do_attach_infrabaseuses the idiomaticbbwarn/bbfatalagain (build: auto-build QEMU on a virt BSP build when its binary is missing #298 worked around it with plainecho; reverted here).inherit logginglines are removed.Validation
bitbake -pparses all recipes, 0 errors.bitbake -e bsp-so3(no longer inherits logging explicitly) still definesbbfatal()→ confirmed inherited viabase.