@@ -949,10 +949,15 @@ async fn upgrade(
949949 } else {
950950 // Check if image exists in bootc storage (/usr/lib/bootc/storage)
951951 let imgstore = sysroot. get_ensure_imgstore ( ) ?;
952- let use_unified = match imgstore. exists ( & format ! ( "{imgref:#}" ) ) . await {
952+
953+ let image_ref_str = crate :: utils:: imageref_to_container_ref ( imgref) ;
954+
955+ let use_unified = match imgstore. exists ( & image_ref_str) . await {
953956 Ok ( v) => v,
954957 Err ( e) => {
955- tracing:: warn!( "Failed to check bootc storage for image: {e}; falling back to standard pull" ) ;
958+ tracing:: warn!(
959+ "Failed to check bootc storage for image: {e}; falling back to standard pull"
960+ ) ;
956961 false
957962 }
958963 } ;
@@ -1078,10 +1083,15 @@ async fn switch_ostree(
10781083
10791084 // Check if image exists in bootc storage (/usr/lib/bootc/storage)
10801085 let imgstore = sysroot. get_ensure_imgstore ( ) ?;
1081- let use_unified = match imgstore. exists ( & format ! ( "{target:#}" ) ) . await {
1086+
1087+ let target_ref_str = crate :: utils:: imageref_to_container_ref ( & target) ;
1088+
1089+ let use_unified = match imgstore. exists ( & target_ref_str) . await {
10821090 Ok ( v) => v,
10831091 Err ( e) => {
1084- tracing:: warn!( "Failed to check bootc storage for image: {e}; falling back to standard pull" ) ;
1092+ tracing:: warn!(
1093+ "Failed to check bootc storage for image: {e}; falling back to standard pull"
1094+ ) ;
10851095 false
10861096 }
10871097 } ;
@@ -1480,9 +1490,7 @@ async fn run_from_opt(opt: Opt) -> Result<()> {
14801490 ImageOpts :: CopyToStorage { source, target } => {
14811491 crate :: image:: push_entrypoint ( source. as_deref ( ) , target. as_deref ( ) ) . await
14821492 }
1483- ImageOpts :: SetUnified => {
1484- crate :: image:: set_unified_entrypoint ( ) . await
1485- }
1493+ ImageOpts :: SetUnified => crate :: image:: set_unified_entrypoint ( ) . await ,
14861494 ImageOpts :: PullFromDefaultStorage { image } => {
14871495 let storage = get_storage ( ) . await ?;
14881496 storage
0 commit comments