ostreedev / ostree-rs-ext

Rust library with higher level APIs on top of the core ostree API
Apache License 2.0
76 stars 25 forks source link

--previous-build-manifest with different layer num causes panic #624

Open antheas opened 5 months ago

antheas commented 5 months ago

If the user provides a --previous-build-manifest to rpm-ostree compose container-encapsulate which has a different number of max-layers than what was requested, the following line panics: https://github.com/ostreedev/ostree-rs-ext/blob/9a4743a657ffe0435018d9720c6df80a486ca0f1/lib/src/chunking.rs#L625

Expected behavior would be to attempt to do the merge gracefully as far as this library is concerned. Failing that, rpm-ostree should emit a warning and ignore the previous manifest.

Context: I did a build that went from 100 layers to 50.