Skip to content

build: inherit logging in base.bbclass; drop redundant per-recipe inherits#299

Merged
daniel-rossier merged 1 commit into
mainfrom
fix/base-inherit-logging
Jul 16, 2026
Merged

build: inherit logging in base.bbclass; drop redundant per-recipe inherits#299
daniel-rossier merged 1 commit into
mainfrom
fix/base-inherit-logging

Conversation

@daniel-rossier

Copy link
Copy Markdown
Contributor

Follow-up to #298.

Problem

do_attach_infrabase (and other base.bbclass shell tasks) use 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 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 on bbwarn: command not found instead of printing the intended guidance.

Fix

inherit logging in base.bbclass, matching upstream OpenEmbedded. Since base is inherited by every recipe, the bb* shell logging helpers are now available everywhere.

Validation

  • bitbake -p parses all recipes, 0 errors.
  • bitbake -e bsp-so3 (no longer inherits logging explicitly) still defines bbfatal() → confirmed inherited via base.

…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.
@daniel-rossier
daniel-rossier merged commit e0ed41a into main Jul 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant