Skip to content

ostree-ext: reuse prior packing with exclusive components#2109

Draft
officialasishkumar wants to merge 1 commit intobootc-dev:mainfrom
officialasishkumar:chunking-prior-build-exclusive-components
Draft

ostree-ext: reuse prior packing with exclusive components#2109
officialasishkumar wants to merge 1 commit intobootc-dev:mainfrom
officialasishkumar:chunking-prior-build-exclusive-components

Conversation

@officialasishkumar
Copy link
Copy Markdown

Summary

Reuse the prior-build packing layout when exclusive components have already been split into dedicated layers.

Changes

  • drop prior-build bins that become empty after exclusive components are filtered out
  • keep the trailing reserved "new packages" bin so added regular components still have a stable destination
  • add a regression test covering prior-build reuse with exclusive components

Testing

  • cargo fmt --check --all
  • docker run --rm -v /home/ashish/asish_workspace/personal/bootc:/src -w /src fedora:42 bash -lc 'set -euo pipefail && dnf -y install rust cargo pkgconf-pkg-config glib2-devel ostree-devel openssl-devel systemd-devel libzstd-devel git gcc make && cargo test -p ostree-ext test_advanced_packing -- --nocapture && cargo test -p ostree-ext test_exclusive_chunks -- --nocapture'

Fixes #2057

@github-actions github-actions bot added the area/ostree Issues related to ostree label Mar 31, 2026
@bootc-bot bootc-bot bot requested a review from jmarrero March 31, 2026 11:04
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request modifies the basic_packing_with_prior_build function in crates/ostree-ext/src/chunking.rs to correctly handle exclusive-component bins. It introduces logic to filter out empty bins from the prior build while ensuring the final reserved bin for new packages is preserved. Additionally, the bin size validation check has been moved to execute after this filtering process. A new test case, test_advanced_packing_with_prior_exclusive_components, was added to verify that the prior layout remains reusable after exclusive bins are removed. I have no feedback to provide.

@officialasishkumar officialasishkumar marked this pull request as draft March 31, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ostree Issues related to ostree

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ostree-ext: Packing with prior build fails if build has exclusive components

1 participant