@@ -944,10 +944,15 @@ async fn upgrade(
944944 } else {
945945 // Check if image exists in bootc storage (/usr/lib/bootc/storage)
946946 let imgstore = sysroot. get_ensure_imgstore ( ) ?;
947- let use_unified = match imgstore. exists ( & format ! ( "{imgref:#}" ) ) . await {
947+
948+ let image_ref_str = crate :: utils:: imageref_to_container_ref ( imgref) ;
949+
950+ let use_unified = match imgstore. exists ( & image_ref_str) . await {
948951 Ok ( v) => v,
949952 Err ( e) => {
950- tracing:: warn!( "Failed to check bootc storage for image: {e}; falling back to standard pull" ) ;
953+ tracing:: warn!(
954+ "Failed to check bootc storage for image: {e}; falling back to standard pull"
955+ ) ;
951956 false
952957 }
953958 } ;
@@ -1073,10 +1078,15 @@ async fn switch_ostree(
10731078
10741079 // Check if image exists in bootc storage (/usr/lib/bootc/storage)
10751080 let imgstore = sysroot. get_ensure_imgstore ( ) ?;
1076- let use_unified = match imgstore. exists ( & format ! ( "{target:#}" ) ) . await {
1081+
1082+ let target_ref_str = crate :: utils:: imageref_to_container_ref ( & target) ;
1083+
1084+ let use_unified = match imgstore. exists ( & target_ref_str) . await {
10771085 Ok ( v) => v,
10781086 Err ( e) => {
1079- tracing:: warn!( "Failed to check bootc storage for image: {e}; falling back to standard pull" ) ;
1087+ tracing:: warn!(
1088+ "Failed to check bootc storage for image: {e}; falling back to standard pull"
1089+ ) ;
10801090 false
10811091 }
10821092 } ;
@@ -1473,9 +1483,7 @@ async fn run_from_opt(opt: Opt) -> Result<()> {
14731483 ImageOpts :: CopyToStorage { source, target } => {
14741484 crate :: image:: push_entrypoint ( source. as_deref ( ) , target. as_deref ( ) ) . await
14751485 }
1476- ImageOpts :: SetUnified => {
1477- crate :: image:: set_unified_entrypoint ( ) . await
1478- }
1486+ ImageOpts :: SetUnified => crate :: image:: set_unified_entrypoint ( ) . await ,
14791487 ImageOpts :: PullFromDefaultStorage { image } => {
14801488 let storage = get_storage ( ) . await ?;
14811489 storage
0 commit comments