Skip to content

Commit

Permalink
install: Use skopeo instead of podman
Browse files Browse the repository at this point in the history
Right now we depend on both in general (the ostree-container side uses
skopeo, the logically bound images use podman), but today LBIs are
a "soft" dependency.

Let's use skopeo here for consistency.

Signed-off-by: Colin Walters <walters@verbum.org>
  • Loading branch information
cgwalters committed Dec 6, 2024
1 parent 73cfb1e commit 1e737fb
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/src/podman.rs
Original file line number Diff line number Diff line change
@@ -30,14 +30,12 @@ pub(crate) struct ImageListEntry {
#[cfg(feature = "install")]
pub(crate) fn imageid_to_digest(imgid: &str) -> Result<String> {
use bootc_utils::CommandRunExt;
let o: Vec<Inspect> = std::process::Command::new("podman")
.args(["inspect", imgid])
// Use skopeo here as that's our current baseline dependency.
let o: Inspect = std::process::Command::new("skopeo")
.arg("inspect")
.arg(format!("containers-storage:{imgid}"))
.run_and_parse_json()?;
let i = o
.into_iter()
.next()
.ok_or_else(|| anyhow::anyhow!("No images returned for inspect"))?;
Ok(i.digest)
Ok(o.digest)
}

/// Return true if there is apparently an active container store at the target path.

0 comments on commit 1e737fb

Please sign in to comment.