From 62174c7c1ee254e8aafddf1caa4f45f77c8026f2 Mon Sep 17 00:00:00 2001 From: Arkadiusz Hiler Date: Fri, 13 Jan 2023 17:20:54 +0200 Subject: [PATCH] default_pfx.py: Don't accept the shell argument any more. We now only invoke it inside of the container instead of passing the `docker run ...` as a parameter. --- default_pfx.py | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/default_pfx.py b/default_pfx.py index 4562b6ec..3a926227 100755 --- a/default_pfx.py +++ b/default_pfx.py @@ -109,22 +109,15 @@ def filter_registry(filename): os.rename(filename + '.tmp', filename) -def make_default_pfx(default_pfx_dir, dist_dir, runtime): +def make_default_pfx(default_pfx_dir, dist_dir): local_env = dict(os.environ) ld_path = dist_dir + "/lib64:" + dist_dir + "/lib" - if runtime is None: - local_env["LD_LIBRARY_PATH"] = ld_path - local_env["WINEPREFIX"] = default_pfx_dir - local_env["WINEDEBUG"] = "-all" - runtime_args = [] - else: - #the runtime clears the environment, so we pass it in on the CL via env - runtime_args = runtime + ["env", - "LD_LIBRARY_PATH=" + ld_path, - "WINEPREFIX=" + default_pfx_dir, - "WINEDEBUG=-all"] + local_env["LD_LIBRARY_PATH"] = ld_path + local_env["WINEPREFIX"] = default_pfx_dir + local_env["WINEDEBUG"] = "-all" + runtime_args = [] subprocess.run(runtime_args + ["/bin/bash", "-c", os.path.join(dist_dir, 'bin', 'wine') + " wineboot && " + @@ -138,7 +131,4 @@ def make_default_pfx(default_pfx_dir, dist_dir, runtime): if __name__ == '__main__': import sys - if len(sys.argv) > 3: - make_default_pfx(sys.argv[1], sys.argv[2], sys.argv[3:]) - else: - make_default_pfx(sys.argv[1], sys.argv[2], None) + make_default_pfx(sys.argv[1], sys.argv[2])