From cf11ed29554211dbf56088af0429ec282dc2bfc6 Mon Sep 17 00:00:00 2001 From: John Eckersberg Date: Thu, 21 Mar 2024 16:08:20 -0400 Subject: [PATCH] Correctly populate container environment rootless status Previously this was just always None via Default. Also updated trace logging to show the entire container_info struct. All of those fields are potentially useful, not just engine. Signed-off-by: John Eckersberg --- lib/src/containerenv.rs | 1 + lib/src/install.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/containerenv.rs b/lib/src/containerenv.rs index 537c97d9b..2e9ffcb46 100644 --- a/lib/src/containerenv.rs +++ b/lib/src/containerenv.rs @@ -48,6 +48,7 @@ pub(crate) fn get_container_execution_info(rootfs: &Dir) -> Result r.id = v.to_string(), "image" => r.image = v.to_string(), "imageid" => r.imageid = v.to_string(), + "rootless" => r.rootless = Some(v.to_string()), _ => {} } } diff --git a/lib/src/install.rs b/lib/src/install.rs index ea2932b56..50b1a65eb 100644 --- a/lib/src/install.rs +++ b/lib/src/install.rs @@ -1003,7 +1003,7 @@ async fn prepare_install( "Cannot install from rootless podman; this command must be run as root" ); } - tracing::trace!("Read container engine info {:?}", container_info.engine); + tracing::trace!("Read container engine info {:?}", container_info); SourceInfo::from_container(&container_info)? }