From 5730f9fa7f9a03662727eae97306d6a0a1ae580d Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 8 Sep 2023 10:56:45 -0400 Subject: [PATCH] chunking: Ignore ostree commit layer I was hitting a panic in this section of the code; I think triggering it involves removing packages, but I haven't narrowed it down more precisely. Hopefully at some point I will try to add some more unit testing for this... --- lib/src/chunking.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/chunking.rs b/lib/src/chunking.rs index 657c74e60..62d2a0ab7 100644 --- a/lib/src/chunking.rs +++ b/lib/src/chunking.rs @@ -606,6 +606,10 @@ fn basic_packing_with_prior_build<'a>( for bin in curr_build { let mut mod_bin = Vec::new(); for pkg in bin { + // An empty component set can happen for the ostree commit layer; ignore that. + if pkg.is_empty() { + continue; + } mod_bin.push(name_to_component[&pkg]); } modified_build.push(mod_bin);