Description
Commit 9c268db (Track salt/_version.txt in salt_onedir before pip install ...) added a git add -f salt/_version.txt block inside tools/pkg/build.py::salt_onedir with cwd=str(salt_archive), where salt_archive is a .tar.gz file (not a directory):
salt_archive = pathlib.Path(salt_name).resolve()
...
ctx.run(
"git", "add", "-f", "salt/_version.txt",
check=False,
cwd=str(salt_archive), # salt_archive is a tarball, not a dir
)
The Python subprocess implementation calls chdir() on cwd and raises:
NotADirectoryError: [Errno 20] Not a directory: '/.../salt-3008.0+NNN.gSHA.tar.gz'
Setup
Any master PR's Build Salt Onedir job on Linux or macOS slices reproduces this. Windows takes a different branch (pkg\\windows\\install_salt.cmd) and is unaffected.
Local repro:
import subprocess
subprocess.run(['echo', 'x'], cwd='/tmp/anything.tar.gz')
# NotADirectoryError: [Errno 20] Not a directory: '/tmp/anything.tar.gz'
Impact
Blocks every master PR's Build Salt Onedir job on Linux + macOS.
Versions Report
master (post 9c268db, 2026-06-10).
Description
Commit 9c268db (
Track salt/_version.txt in salt_onedir before pip install ...) added agit add -f salt/_version.txtblock insidetools/pkg/build.py::salt_onedirwithcwd=str(salt_archive), wheresalt_archiveis a.tar.gzfile (not a directory):The Python subprocess implementation calls
chdir()oncwdand raises:Setup
Any master PR's
Build Salt Onedirjob on Linux or macOS slices reproduces this. Windows takes a different branch (pkg\\windows\\install_salt.cmd) and is unaffected.Local repro:
Impact
Blocks every master PR's Build Salt Onedir job on Linux + macOS.
Versions Report
master (post 9c268db, 2026-06-10).