From 5e880bc68b711cf46e89aca935ffb91f6ceff4f9 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Fri, 19 Feb 2021 13:11:35 +0000
Subject: [PATCH] populate-depot: Assume pressure-vessel-wrap unpacks runtimes

Signed-off-by: Simon McVittie <smcv@collabora.com>
(originally steamrt/steamlinuxruntime@3f821430)
---
 pressure-vessel/populate-depot.py | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/pressure-vessel/populate-depot.py b/pressure-vessel/populate-depot.py
index 0a7a4c15a..885d02472 100755
--- a/pressure-vessel/populate-depot.py
+++ b/pressure-vessel/populate-depot.py
@@ -270,14 +270,19 @@ me="$(readlink -f "$0")"
 here="${{me%/*}}"
 me="${{me##*/}}"
 
-exec "$here/run-in-steamrt" \\
-    --arch={escaped_arch} \\
-    --deploy \\
-    --runtime={escaped_runtime} \\
-    --suite={escaped_suite} \\
-    {escaped_name} \\
-    -- \\
-    "$@"
+archive={escaped_runtime}-{escaped_arch}-{escaped_suite}-runtime.tar.gz
+pressure_vessel="${{PRESSURE_VESSEL_PREFIX:-"${{here}}/pressure-vessel"}}"
+
+export PRESSURE_VESSEL_GC_LEGACY_RUNTIMES=1
+unset PRESSURE_VESSEL_RUNTIME
+export PRESSURE_VESSEL_RUNTIME_ARCHIVE="${{archive}}"
+export PRESSURE_VESSEL_RUNTIME_BASE="${{here}}"
+
+if [ -z "${{PRESSURE_VESSEL_VARIABLE_DIR-}}" ]; then
+    export PRESSURE_VESSEL_VARIABLE_DIR="${{here}}/var"
+fi
+
+exec "${{pressure_vessel}}/bin/pressure-vessel-unruntime" "$@"
 '''
 
 
@@ -661,8 +666,6 @@ class Main:
                 writer.write('// Generated file, do not edit\n')
                 words = [
                     '/_v2-entry-point',
-                    '--deploy=' + shlex.quote(runtime.name),
-                    '--suite=' + shlex.quote(runtime.suite),
                     '--verb=%verb%',
                     '--',
                 ]
-- 
GitLab