Problem
configure.py writes non-Windows generated environment files as unquoted POSIX shell assignments. An inherited value containing a space makes the generated env.sh invalid.
Minimal reproduction
Run configure with a PATH entry such as:
/Applications/Little Snitch.app/Contents/Components
Current output contains an unquoted line equivalent to:
export PATH=/usr/bin:/Applications/Little Snitch.app/Contents/Components:/bin
Sourcing that line splits the value at the spaces and attempts to export extra words. The generated environment therefore cannot reproduce the configure environment.
Expected output is shell-quoted, for example:
export PATH='/usr/bin:/Applications/Little Snitch.app/Contents/Components:/bin'
Minimal fix
On non-Windows hosts, pass each stringified value through Python's shlex.quote before emitting export KEY=value. Windows env.bat output is unchanged. PR: #752.
Validation
- Reproduced independently on current
origin/main (5ac81eda).
python3 -m py_compile configure.py and git diff --check pass.
- Ran a clean Darwin configure with the inherited Little Snitch path.
- The generated
env.sh sources successfully and restores the original PATH byte-for-byte.
- The integrated full Darwin/Arm build completes after sourcing that file and supplying the separate kBuild SDK/tool overrides required by the current tree.
Scope note
This issue is only about POSIX shell quoting. It does not assert that env.sh by itself carries every selected SDK setting into kBuild; the current Darwin build still needs explicit PATH_SDK_MACOSX* and tool overrides.
Problem
configure.pywrites non-Windows generated environment files as unquoted POSIX shell assignments. An inherited value containing a space makes the generatedenv.shinvalid.Minimal reproduction
Run configure with a
PATHentry such as:Current output contains an unquoted line equivalent to:
export PATH=/usr/bin:/Applications/Little Snitch.app/Contents/Components:/binSourcing that line splits the value at the spaces and attempts to export extra words. The generated environment therefore cannot reproduce the configure environment.
Expected output is shell-quoted, for example:
Minimal fix
On non-Windows hosts, pass each stringified value through Python's
shlex.quotebefore emittingexport KEY=value. Windowsenv.batoutput is unchanged. PR: #752.Validation
origin/main(5ac81eda).python3 -m py_compile configure.pyandgit diff --checkpass.env.shsources successfully and restores the originalPATHbyte-for-byte.Scope note
This issue is only about POSIX shell quoting. It does not assert that
env.shby itself carries every selected SDK setting into kBuild; the current Darwin build still needs explicitPATH_SDK_MACOSX*and tool overrides.