File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ pub const LEGACY_VERSION_LABEL: &str = "version";
2727/// The label which indicates where the ostree layers stop, and the
2828/// derived ones start.
2929pub const DIFFID_LABEL : & str = "ostree.final-diffid" ;
30+ /// The label for bootc.
31+ pub const BOOTC_LABEL : & str = "containers.bootc" ;
3032
3133/// Annotation injected into the layer to say that this is an ostree commit.
3234/// However, because this gets lost when converted to D2S2 https://docs.docker.com/registry/spec/manifest-v2-2/
@@ -68,7 +70,7 @@ fn commit_meta_to_labels<'a>(
6870 #[ allow( clippy:: explicit_auto_deref) ]
6971 if let Some ( v) = meta. lookup :: < bool > ( * ostree:: METADATA_KEY_BOOTABLE ) ? {
7072 labels. insert ( ostree:: METADATA_KEY_BOOTABLE . to_string ( ) , v. to_string ( ) ) ;
71- labels. insert ( "containers.bootc" . into ( ) , "1" . into ( ) ) ;
73+ labels. insert ( BOOTC_LABEL . into ( ) , "1" . into ( ) ) ;
7274 }
7375 // Handle any other string-typed values here.
7476 for k in & [ & ostree:: METADATA_KEY_LINUX ] {
Original file line number Diff line number Diff line change @@ -584,7 +584,9 @@ impl ImageImporter {
584584 let config_labels = super :: labels_of ( & config) ;
585585 if self . require_bootable {
586586 let bootable_key = * ostree:: METADATA_KEY_BOOTABLE ;
587- let bootable = config_labels. map_or ( false , |l| l. contains_key ( bootable_key) ) ;
587+ let bootable = config_labels. map_or ( false , |l| {
588+ l. contains_key ( bootable_key) || l. contains_key ( BOOTC_LABEL )
589+ } ) ;
588590 if !bootable {
589591 anyhow:: bail!( "Target image does not have {bootable_key} label" ) ;
590592 }
You can’t perform that action at this time.
0 commit comments