MCPcopy Create free account
hub / github.com/bootc-dev/bootc / check_bootc_label

Function check_bootc_label

crates/lib/src/deploy.rs:173–197  ·  view source on GitHub ↗
(config: &ostree_ext::oci_spec::image::ImageConfiguration)

Source from the content-addressed store, hash-verified

171}
172
173pub(crate) fn check_bootc_label(config: &ostree_ext::oci_spec::image::ImageConfiguration) {
174 if let Some(label) =
175 labels_of_config(config).and_then(|labels| labels.get(crate::metadata::BOOTC_COMPAT_LABEL))
176 {
177 match label.as_str() {
178 crate::metadata::COMPAT_LABEL_V1 => {}
179 o => crate::journal::journal_print(
180 libsystemd::logging::Priority::Warning,
181 &format!(
182 "notice: Unknown {} value {}",
183 crate::metadata::BOOTC_COMPAT_LABEL,
184 o
185 ),
186 ),
187 }
188 } else {
189 crate::journal::journal_print(
190 libsystemd::logging::Priority::Warning,
191 &format!(
192 "notice: Image is missing label: {}",
193 crate::metadata::BOOTC_COMPAT_LABEL
194 ),
195 )
196 }
197}
198
199fn descriptor_of_progress(p: &ImportProgress) -> &Descriptor {
200 match p {

Callers 3

upgradeFunction · 0.85
prepare_for_pullFunction · 0.85
prepare_for_pull_unifiedFunction · 0.85

Calls 2

labels_of_configFunction · 0.85
journal_printFunction · 0.85

Tested by

no test coverage detected