File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -327,6 +327,16 @@ pub(crate) async fn prune_container_store(sysroot: &Storage) -> Result<()> {
327327 for deployment in deployments {
328328 let bound = crate :: boundimage:: query_bound_images_for_deployment ( ostree, & deployment) ?;
329329 all_bound_images. extend ( bound. into_iter ( ) ) ;
330+ // Also include the host image itself
331+ if let Some ( host_image) = crate :: status:: boot_entry_from_deployment ( ostree, & deployment) ?
332+ . image
333+ . map ( |i| i. image )
334+ {
335+ all_bound_images. push ( crate :: boundimage:: BoundImage {
336+ image : crate :: utils:: imageref_to_container_ref ( & host_image) ,
337+ auth_file : None ,
338+ } ) ;
339+ }
330340 }
331341 // Convert to a hashset of just the image names
332342 let image_names = HashSet :: from_iter ( all_bound_images. iter ( ) . map ( |img| img. image . as_str ( ) ) ) ;
Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ impl CStorage {
311311 . names
312312 . iter ( )
313313 . flatten ( )
314- . any ( |name| !roots. contains ( name. as_str ( ) ) )
314+ . all ( |name| !roots. contains ( name. as_str ( ) ) )
315315 {
316316 garbage. push ( image. id ) ;
317317 }
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ fn imagestatus(
186186
187187/// Given an OSTree deployment, parse out metadata into our spec.
188188#[ context( "Reading deployment metadata" ) ]
189- fn boot_entry_from_deployment (
189+ pub ( crate ) fn boot_entry_from_deployment (
190190 sysroot : & SysrootLock ,
191191 deployment : & ostree:: Deployment ,
192192) -> Result < BootEntry > {
You can’t perform that action at this time.
0 commit comments