Skip to content

Commit 96672a9

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 c54fefa commit 96672a9

File tree

8 files changed

+41
-97
lines changed

8 files changed

+41
-97
lines changed

Cargo.lock

Lines changed: 33 additions & 88 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ostree-ext/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rust-version = "1.74.0"
1515
# semver here you must also bump our semver.
1616
containers-image-proxy = "0.7.0"
1717
# We re-export this library too.
18-
ostree = { features = ["v2022_6"], version = "0.19.0" }
18+
ostree = { features = ["v2025_1"], version = "0.20.0" }
1919

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

ostree-ext/src/container/encapsulate.rs

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::str::FromStr;
77

88
use anyhow::{Context, Result};
99
use camino::Utf8Path;
10-
use glib::Cast;
10+
use ostree::glib::object::Cast;
1111
use ostree::prelude::FileExt;
1212
use ostree::{gio, glib};
1313

ostree-ext/src/tar/import.rs

Lines changed: 1 addition & 1 deletion
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)