bsp-cli: version the package on the family's own packages/bsp files - #10327
Open
lukaszsobala wants to merge 2 commits into
Open
bsp-cli: version the package on the family's own packages/bsp files#10327lukaszsobala wants to merge 2 commits into
lukaszsobala wants to merge 2 commits into
Conversation
artifact_armbian-bsp-cli_prepare_version() hashes packages/bsp/common and the
config/optional/.../_packages/bsp-cli trees, and nothing else under packages/.
Family files do not arrive that way - they are installed by
post_family_tweaks_bsp hooks, out of packages/bsp/<family>/ - and the hooks are
hashed only as source text. An `install ${SRC}/packages/bsp/foo/bar` line reads
the same whether bar changed or not.
So editing a family's bsp file moves no component of the version string. The
artifact then collides with an older build, artifacts-obtain.sh finds it in the
local or remote cache, unpacks that deb-tar, and the image ships the previous
copy of the file. Nothing warns; the build log says cache hit, which is what a
cache hit always says.
It stays hidden because the hash is board-independent in practice: with no
config/optional entries for most boards, packages/bsp/common is the whole input
and every board on the tree carries the same PC component. A family file is
simply never part of it.
Hash packages/bsp/${LINUXFAMILY} alongside the rest. calculate_hash_for_all_files_in_dirs()
skips directories that do not exist, so families without one keep their exact
current version and nothing is rebuilt for them.
The family-named directory does not cover everything: a family or extension can
install from any path under packages/, and packages/bsp/aic8800 is shared by
several unrelated boards. Those cannot be derived from LINUXFAMILY, so add
BSP_CLI_EXTRA_HASH_DIRS for them - append a directory from the family config or
an extension's extension_prepare_config and it versions the package like every
other input. Left empty here; the boards that need it are a separate change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
📝 WalkthroughWalkthroughThe BSP CLI package hash now validates ChangesBSP CLI package hashing
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
5 tasks
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.
Companion to #10326. But the board will still work without it.
Affected boards: every family with a
packages/bsp/<family>/directory, plus every board with apackages/bsp/<board>/. These rebuild once, everything else keeps its exact current version.Description
Better hashing of BSP artifacts
artifact_armbian-bsp-cli_prepare_version()hashes packages/bsp/common and theconfig/optional/.../_packages/bsp-cli trees, and nothing else under packages/. Family files do not arrive that way - they are installed by post_family_tweaks_bsp hooks, out ofpackages/bsp/<family>/- and the hooks are hashed only as source text. Aninstall ${SRC}/packages/bsp/foo/barline reads the same whether bar changed or not.So editing a family's bsp file moves no component of the version string. The artifact then collides with an older build, artifacts-obtain.sh finds it in the local or remote cache, unpacks that deb-tar, and the image ships the previous copy of the file. Nothing warns; the build log says cache hit, which is what a cache hit always says.
It stays hidden because the hash is board-independent in practice: with no config/optional entries for most boards, packages/bsp/common is the whole input and every board on the tree carries the same PC component. A family file is simply never part of it.
Hash
packages/bsp/${LINUXFAMILY}alongside the rest.calculate_hash_for_all_files_in_dirs()skips directories that do not exist, so families without one keep their exact current version and nothing is rebuilt for them.The family-named directory does not cover everything: a family or extension can install from any path under packages/, and packages/bsp/aic8800 is shared by several unrelated boards. Those cannot be derived from
LINUXFAMILY, so addBSP_CLI_EXTRA_HASH_DIRSfor them - append a directory from the family config or an extension's extension_prepare_config and it versions the package like every other input. Left empty here; the boards that need it are a separate change.How Has This Been Tested?
The hashes change when files change, previously they did not.
Checklist:
Please delete options that are not relevant.
Summary by CodeRabbit