Revert "Get rid of unnecessary bash wrappers in subprocesses.Popen"

This reverts commit e572bab3ee5aa40f57bdc6e11d6381cad1d1401a.

The problem with skipping the "unnecessary" bash wrappers is that Ubuntu
systems use 'dash' as a default shell, which does not support our build
infrastructure. While we do recommend not using dash for building FPGA
builds in our documentation, it's not obvious that dash is the problem
when calling rfnoc_image_builder.


Original-commit: 888850d6417c93f561e0555c693e3f11e9f40856
This commit is contained in:
Martin Braun
2025-02-20 10:24:16 +01:00
committed by Martin Braun
parent bb2bfbfe95
commit 1a3bdccd51
+1 -3
View File
@@ -374,11 +374,9 @@ def run_fpga_build(
cmd_build_num, cmd_build_num,
) )
logging.info(f"Running FPGA build command: {cmd}") logging.info(f"Running FPGA build command: {cmd}")
my_env = os.environ.copy()
with subprocess.Popen( with subprocess.Popen(
cmd, cmd,
shell=True, shell=True,
env=my_env,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, stderr=subprocess.STDOUT,
bufsize=1, bufsize=1,
@@ -462,7 +460,7 @@ def run_ip_build(
logging.info(f"Running IP build with command: {cmd}") logging.info(f"Running IP build with command: {cmd}")
output = "" output = ""
with subprocess.Popen( with subprocess.Popen(
cmd, f'/bin/bash -c "{cmd}"',
shell=True, shell=True,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, stderr=subprocess.STDOUT,