From 2239d4de6c607c4739407240d426ed7f967710b5 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 4 Aug 2023 08:39:59 -0400 Subject: [PATCH] Revert "main: Drop deprecated `container-encapsulate` entrypoint" This reverts commit 2d07002d2e6a3516195a3e413e1047c6a7661365. It turns out that this is used by osbuild today https://github.com/osbuild/osbuild/blob/14d31633a4b14878735ed5222befb895b16de2d1/stages/org.osbuild.ostree.encapsulate#L112 We'll do a patch to port to the new API there but let's just carry this for $time where values of $time are probably at least a year. --- rust/src/main.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rust/src/main.rs b/rust/src/main.rs index 1439b9f2ff..63f0bf2168 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -34,6 +34,14 @@ async fn inner_async_main(args: Vec) -> Result { "usroverlay" | "unlock" => builtins::usroverlay::entrypoint(args).map(|_| 0), // A hidden wrapper to intercept some binaries in RPM scriptlets. "scriptlet-intercept" => builtins::scriptlet_intercept::entrypoint(args).map(|_| 0), + // This is a deprecated entrypoint + "container-encapsulate" => { + rpmostree_rust::client::warn_future_incompatibility( + "This entrypoint is deprecated; use `rpm-ostree compose container-encapsulate` instead", + ); + rpmostree_rust::container::container_encapsulate(args_orig).map(|_| 0) + .map_err(anyhow::Error::msg) + }, // C++ main _ => Ok(rpmostree_rust::ffi::rpmostree_main(args)?), }