diff --git a/lib/src/chunking.rs b/lib/src/chunking.rs index 9fdb0517..86c7a346 100644 --- a/lib/src/chunking.rs +++ b/lib/src/chunking.rs @@ -553,12 +553,15 @@ fn basic_packing<'a>( { println!("Keeping old package structure"); let mut curr_build: Vec> = prior_build.clone(); + //Packing only manaages RPMs not OStree commit + curr_build.remove(0); let mut prev_pkgs: Vec = Vec::new(); - for bin in prior_build { + for bin in &curr_build { for pkg in bin { prev_pkgs.push(pkg.to_string()); } } + prev_pkgs.retain(|name| name != ""); let curr_pkgs: Vec = components .iter() .map(|pkg| pkg.meta.name.to_string()) @@ -576,6 +579,7 @@ fn basic_packing<'a>( rem_pkgs_v.push(pkg.to_string()); } let curr_build_len = &curr_build.len(); + curr_build[curr_build_len - 1].retain(|name| name != ""); curr_build[curr_build_len - 1].extend(add_pkgs_v); for bin in curr_build.iter_mut() { bin.retain(|pkg| !rem_pkgs_v.contains(&pkg));