@@ -111,8 +111,8 @@ const GUEST_IMAGE_CONFIG_DIR: &str = "openshell-image";
111111const GUEST_IMAGE_OCI_LAYOUT_DIR : & str = "oci" ;
112112const GUEST_IMAGE_OCI_REF : & str = "openshell" ;
113113const IMAGE_EXPORT_ROOTFS_ARCHIVE : & str = "source-rootfs.tar" ;
114- const BOOTSTRAP_IMAGE_CACHE_LAYOUT_VERSION : & str = "sandbox-bootstrap-rootfs-ext4-v2 " ;
115- const PREPARED_IMAGE_CACHE_LAYOUT_VERSION : & str = "sandbox-prepared-rootfs-ext4-umoci-v2 " ;
114+ const BOOTSTRAP_IMAGE_CACHE_LAYOUT_VERSION : & str = "sandbox-bootstrap-rootfs-ext4-v3 " ;
115+ const PREPARED_IMAGE_CACHE_LAYOUT_VERSION : & str = "sandbox-prepared-rootfs-ext4-umoci-v3 " ;
116116const IMAGE_IDENTITY_FILE : & str = "image-identity" ;
117117const IMAGE_REFERENCE_FILE : & str = "image-reference" ;
118118const IMAGE_PREP_INIT_MODE : & str = "image-prep" ;
@@ -3725,11 +3725,17 @@ fn write_oci_layout_for_manifest(
37253725}
37263726
37273727fn bootstrap_image_cache_identity ( image_identity : & str ) -> String {
3728- format ! ( "{BOOTSTRAP_IMAGE_CACHE_LAYOUT_VERSION}:{image_identity}" )
3728+ format ! (
3729+ "{BOOTSTRAP_IMAGE_CACHE_LAYOUT_VERSION}:openshell-{}:{image_identity}" ,
3730+ openshell_core:: VERSION
3731+ )
37293732}
37303733
37313734fn prepared_image_cache_identity ( image_identity : & str ) -> String {
3732- format ! ( "{PREPARED_IMAGE_CACHE_LAYOUT_VERSION}:{image_identity}" )
3735+ format ! (
3736+ "{PREPARED_IMAGE_CACHE_LAYOUT_VERSION}:openshell-{}:{image_identity}" ,
3737+ openshell_core:: VERSION
3738+ )
37333739}
37343740
37353741fn registry_layer_download_concurrency ( ) -> usize {
@@ -5517,18 +5523,24 @@ mod tests {
55175523 }
55185524
55195525 #[ test]
5520- fn prepared_image_cache_identity_includes_rootfs_layout_version ( ) {
5526+ fn prepared_image_cache_identity_includes_rootfs_layout_and_openshell_version ( ) {
55215527 assert_eq ! (
55225528 prepared_image_cache_identity( "sha256:local-image" ) ,
5523- "sandbox-prepared-rootfs-ext4-umoci-v2:sha256:local-image"
5529+ format!(
5530+ "sandbox-prepared-rootfs-ext4-umoci-v3:openshell-{}:sha256:local-image" ,
5531+ openshell_core:: VERSION
5532+ )
55245533 ) ;
55255534 }
55265535
55275536 #[ test]
5528- fn bootstrap_image_cache_identity_includes_rootfs_layout_version ( ) {
5537+ fn bootstrap_image_cache_identity_includes_rootfs_layout_and_openshell_version ( ) {
55295538 assert_eq ! (
55305539 bootstrap_image_cache_identity( "sha256:bootstrap-image" ) ,
5531- "sandbox-bootstrap-rootfs-ext4-v2:sha256:bootstrap-image"
5540+ format!(
5541+ "sandbox-bootstrap-rootfs-ext4-v3:openshell-{}:sha256:bootstrap-image" ,
5542+ openshell_core:: VERSION
5543+ )
55325544 ) ;
55335545 }
55345546
0 commit comments