Skip to content

Commit

Permalink
Bump ostree-ext to 0.15.1
Browse files Browse the repository at this point in the history
Signed-off-by: Colin Walters <[email protected]>
  • Loading branch information
HuijingHei authored and cgwalters committed Oct 2, 2024
1 parent f08c4c7 commit 8052d18
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 21 deletions.
45 changes: 34 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ nix = { version = "0.29.0", features = ["fs", "mount", "signal", "user"] }
openssl = "0.10.66"
once_cell = "1.19.0"
os-release = "0.1.0"
ostree-ext = "0.14"
ostree-ext = "0.15"
paste = "1.0"
phf = { version = "0.11", features = ["macros"] }
rand = "0.8.5"
Expand Down
16 changes: 9 additions & 7 deletions rust/src/compose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,15 @@ pub(crate) fn compose_image(args: Vec<String>) -> CxxResult<()> {
let tempdir = Utf8Path::from_path(tempdir.path()).unwrap();

let handle = tokio::runtime::Handle::current();
let proxy = handle.block_on(async {
let config = containers_image_proxy::ImageProxyConfig {
authfile: opt.authfile.as_ref().map(|v| v.as_std_path().to_owned()),
..Default::default()
};
containers_image_proxy::ImageProxy::new_with_config(config).await
})?;
let proxy = handle
.block_on(async {
let config = containers_image_proxy::ImageProxyConfig {
authfile: opt.authfile.as_ref().map(|v| v.as_std_path().to_owned()),
..Default::default()
};
containers_image_proxy::ImageProxy::new_with_config(config).await
})
.expect("Create an image proxy");

let (_cachetempdir, cachedir) = match opt.cachedir {
Some(p) => (None, p),
Expand Down
4 changes: 2 additions & 2 deletions rust/src/sysroot_upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl From<Box<ostree_container::store::LayeredImageState>> for crate::ffi::Conta
crate::ffi::ContainerImageState {
base_commit: s.base_commit,
merge_commit: s.merge_commit,
image_digest: s.manifest_digest,
image_digest: s.manifest_digest.to_string(),
version,
cached_update_diff,
}
Expand All @@ -50,7 +50,7 @@ fn layer_counts<'a>(layers: impl Iterator<Item = &'a ManifestLayerState>) -> (u3
if v.commit.is_some() {
(stored + 1, (n_to_fetch, size_to_fetch))
} else {
(stored, (n_to_fetch + 1, size_to_fetch + v.size()))
(stored, (n_to_fetch + 1, size_to_fetch + v.layer().size()))
}
},
)
Expand Down

0 comments on commit 8052d18

Please sign in to comment.