From ebdc406fa5dfbdbd43e85d4ec68d547a55d199fb Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Thu, 16 Jan 2025 15:03:21 +0000
Subject: [PATCH] populate-depot: Generate ./run and copy to ./run-in-SUITE

We haven't combined more than one runtime in the same top-level
directory since 2021, so it makes more sense for ./run to be treated
as the primary filename here.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 subprojects/container-runtime/populate-depot.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/subprojects/container-runtime/populate-depot.py b/subprojects/container-runtime/populate-depot.py
index eb259707a..a581050fe 100755
--- a/subprojects/container-runtime/populate-depot.py
+++ b/subprojects/container-runtime/populate-depot.py
@@ -1022,9 +1022,7 @@ class Main:
                 exist_ok=True,
             )
 
-        with open(
-            os.path.join(self.depot, 'run-in-' + runtime.name), 'w'
-        ) as writer:
+        with open(os.path.join(self.depot, 'run'), 'w') as writer:
             writer.write(
                 RUN_IN_DIR_SOURCE.format(
                     escaped_dir=shlex.quote(subdir),
@@ -1034,13 +1032,13 @@ class Main:
                 )
             )
 
-        os.chmod(os.path.join(self.depot, 'run-in-' + runtime.name), 0o755)
+        os.chmod(os.path.join(self.depot, 'run'), 0o755)
 
         shutil.copy2(
-            os.path.join(self.depot, 'run-in-' + runtime.name),
             os.path.join(self.depot, 'run'),
+            os.path.join(self.depot, 'run-in-' + runtime.name),
         )
-        os.chmod(os.path.join(self.depot, 'run'), 0o755)
+        os.chmod(os.path.join(self.depot, 'run-in-' + runtime.name), 0o755)
 
         comment = ', '.join(sorted(runtime_files))
 
-- 
GitLab