File 0678-erts-Erlang-OTP-tools-should-look-for-boot-scripts-i.patch of Package erlang

From 0e6163f780827e2f81caea74db8b789feda8ae07 Mon Sep 17 00:00:00 2001
From: Fredrik Frantzen <frazze@erlang.org>
Date: Fri, 7 Nov 2025 09:02:37 +0100
Subject: [PATCH 2/4] erts: Erlang/OTP tools should look for boot scripts in
 the ROOT dir

Handle boot file paths that contain a $ROOT pattern. This will
make it possible to force Erlang/OTP tools to not look in other
code paths for boot files.
---
 erts/preloaded/src/init.erl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/erts/preloaded/src/init.erl b/erts/preloaded/src/init.erl
index bed1570f00..0136ff55ee 100644
--- a/erts/preloaded/src/init.erl
+++ b/erts/preloaded/src/init.erl
@@ -1259,7 +1259,10 @@ path_flags(Flags) ->
     {bs2ss(Pa),bs2ss(Pz)}.
 
 get_boot(BootFile0,Root) ->
-    BootFile = BootFile0 ++ ".boot",
+    BootFile = case BootFile0 of
+        "$ROOT/" ++ BootFile1 -> Root ++ "/bin/" ++ BootFile1 ++ ".boot";
+        _ -> BootFile0 ++ ".boot"
+    end,
     
     case get_boot(BootFile) of
 	{ok, CmdList} ->
-- 
2.51.0

openSUSE Build Service is sponsored by