Skip to content

Commit ffc48c6

Browse files
committed
Update to ostree-rs 0.20
Notably this drops out several duplicate crates. Signed-off-by: Colin Walters <[email protected]>
1 parent 63f49d3 commit ffc48c6

File tree

8 files changed

+41
-97
lines changed

8 files changed

+41
-97
lines changed

Cargo.lock

+33-88
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ostree-ext/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ version = "0.15.3"
1414
# semver here you must also bump our semver.
1515
containers-image-proxy = "0.7.0"
1616
# We re-export this library too.
17-
ostree = { features = ["v2022_6"], version = "0.19.0" }
17+
ostree = { features = ["v2025_1"], version = "0.20.0" }
1818

1919
# Private dependencies
2020
anyhow = { workspace = true }

ostree-ext/src/container/encapsulate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fn commit_meta_to_labels<'a>(
6868
// Copy standard metadata keys `ostree.bootable` and `ostree.linux`.
6969
// Bootable is an odd one out in being a boolean.
7070
#[allow(clippy::explicit_auto_deref)]
71-
if let Some(v) = meta.lookup::<bool>(*ostree::METADATA_KEY_BOOTABLE)? {
71+
if let Some(v) = meta.lookup::<bool>(ostree::METADATA_KEY_BOOTABLE)? {
7272
labels.insert(ostree::METADATA_KEY_BOOTABLE.to_string(), v.to_string());
7373
labels.insert(BOOTC_LABEL.into(), "1".into());
7474
}

ostree-ext/src/container/store.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,9 @@ impl ImageImporter {
602602
) -> Result<Box<PreparedImport>> {
603603
let config_labels = super::labels_of(&config);
604604
if self.require_bootable {
605-
let bootable_key = *ostree::METADATA_KEY_BOOTABLE;
605+
let bootable_key = ostree::METADATA_KEY_BOOTABLE;
606606
let bootable = config_labels.map_or(false, |l| {
607-
l.contains_key(bootable_key) || l.contains_key(BOOTC_LABEL)
607+
l.contains_key(bootable_key.as_str()) || l.contains_key(BOOTC_LABEL)
608608
});
609609
if !bootable {
610610
anyhow::bail!("Target image does not have {bootable_key} label");

ostree-ext/src/fixture.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ fn build_mapping_recurse(
414414
gio::FileType::Directory => {
415415
build_mapping_recurse(path, &child, ret)?;
416416
}
417-
o => anyhow::bail!("Unhandled file type: {}", o),
417+
o => anyhow::bail!("Unhandled file type: {o:?}"),
418418
}
419419
path.pop();
420420
}
@@ -725,7 +725,7 @@ impl Fixture {
725725
metadata.insert("version", &"42.0");
726726
#[allow(clippy::explicit_auto_deref)]
727727
if self.bootable {
728-
metadata.insert(*ostree::METADATA_KEY_BOOTABLE, &true);
728+
metadata.insert(ostree::METADATA_KEY_BOOTABLE, &true);
729729
}
730730
let metadata = metadata.to_variant();
731731
let commit = self.srcrepo.write_commit_with_time(

ostree-ext/src/ima.rs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use camino::Utf8PathBuf;
88
use fn_error_context::context;
99
use gio::glib;
1010
use gio::prelude::*;
11-
use glib::Cast;
1211
use glib::Variant;
1312
use gvariant::aligned_bytes::TryAsAligned;
1413
use gvariant::{gv, Marker, Structure};

ostree-ext/src/ostree_prepareroot.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use std::str::FromStr;
99
use anyhow::{Context, Result};
1010
use camino::Utf8Path;
1111
use cap_std_ext::dirext::CapStdExtDirExt;
12-
use glib::Cast;
1312
use ocidir::cap_std::fs::Dir;
13+
use ostree::glib::object::Cast;
1414
use ostree::prelude::FileExt;
1515
use ostree::{gio, glib};
1616

ostree-ext/src/tar/import.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ impl Importer {
429429
match &mut self.data {
430430
ImporterMode::ObjectSet(_) => {
431431
anyhow::bail!(
432-
"Found metadata object {}.{} in object set mode",
432+
"Found metadata object {}.{:?} in object set mode",
433433
checksum,
434434
objtype
435435
);

0 commit comments

Comments
 (0)