BB_HASHSERVE Warning fix#364
Open
Shreejit-03 wants to merge 1 commit into
Open
Conversation
The SSTATE_MIRRORS export was unconditional, so when no -s/--sstate-mirror
argument was supplied the sstate_mirrors array was empty and the expansion
collapsed to a whitespace-only string (" ").
OE-core now enables hash equivalence by default (BB_HASHSERVE ??= "auto"),
which bitbake resolves to a local unix:// hash server. This made
sanity.bbclass emit a spurious warning on every build.
The check treats any non-empty SSTATE_MIRRORS - even whitespace - as a
configured mirror, so the empty value tripped it. Guard the export so
SSTATE_MIRRORS is only set when a real mirror is provided (via -s) or was
already present in the environment.
Note this intentionally does not suppress the warning when an actual
mirror is configured, as it is legitimate in that case.
Signed-off-by: Shreejit C <shreejit.c@emerson.com>
There was a problem hiding this comment.
Pull request overview
This PR prevents ni-oe-init-build-env from exporting a whitespace-only SSTATE_MIRRORS value when no --sstate-mirror arguments are provided, avoiding a spurious BitBake hash-equivalence sanity warning that is triggered by non-empty (even whitespace) SSTATE_MIRRORS.
Changes:
- Add a guard so
SSTATE_MIRRORSis exported only when it already has a value or when--sstate-mirrorarguments were supplied. - Document why exporting an empty/whitespace-only
SSTATE_MIRRORSis problematic withBB_HASHSERVE="auto".
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Changes
ni-oe-init-build-envexportedSSTATE_MIRRORSunconditionally. When no-s/--sstate-mirrorargument was passed, thesstate_mirrorsarray was emptyand the expansion collapsed to a whitespace-only string (
" ").OE-core recently enabled hash equivalence by default via commit, which adds
BB_HASHSERVE ??= "auto". With"auto", bitbake auto-starts a localhash-equivalence server and resolves
BB_HASHSERVEtounix:///…/hashserve.sock. That flips the local-hashserver condition insanity.bbclassto true, and combined with the whitespaceSSTATE_MIRRORS,the following warning appears on every build:
The sanity check treats any non-empty
SSTATE_MIRRORS— even whitespace — as aconfigured mirror, so the empty value tripped it. This previously went
unnoticed on scarthgap because
BB_HASHSERVEhad no default there and stayedempty, so the
unix://condition was never met.This PR guards the export so
SSTATE_MIRRORSis only set when a real mirror isprovided (via
-s) or was already present in the environment. The warning isintentionally still emitted when an actual mirror is configured, since it is
legitimate in that case.
Justification
AB#3738536.
Testing
Sourced
ni-oe-init-build-envwith no-sargument and confirmed:bitbake -e | grep ^SSTATE_MIRRORS=showsSSTATE_MIRRORSis empty/unset(previously
" ").Sourced with a real mirror (
-s "file://.*" "http://<server>/sstate/PATH")and confirmed
SSTATE_MIRRORSis populated correctly and that the legitimatewarning still appears (expected).
Ran a build
bitbake packagefeed-ni-corebitbake package-indexbitbake nilrt-safemode-rootfsbitbake nilrt-base-system-imageto confirm no regression in environment setup.
Suggested Reviewers: