msys2 / msys2/msys2-runtime

How to disable unix path translation?

Open
#229 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
240
Forks
60
Avg merge
2d 3h
Merged PRs (30d)
1

Description

some program like msiexec.exe only understand Windows path, thus it cause trouble when python program tried to spawn msiexec.exe:

Unpacking msi files...
Traceback (most recent call last):
  File "/home/ACER/portable-msvc.py", line 285, in <module>
    subprocess.check_call(["msiexec.exe", "/a", m, "/quiet", "/qn", f"TARGETDIR={OUTPUT.resolve()}"])
  File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['msiexec.exe', '/a', PosixPath('downloads/Universal CRT Headers Libraries and Sources-x86_en-us.msi'), '/quiet', '/qn', 'TARGETDIR=/home/ACER/msvc']' returned non-zero exit status 103.

I have tried this solution, but it just show another error that I'm not sure that I fully understand the error:

Unpacking msi files...
This installation package could not be opened.  Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.
Traceback (most recent call last):
  File "/home/ACER/portable-msvc.py", line 285, in <module>
    subprocess.check_call(["msiexec.exe", "/a", m, "/quiet", "/qn", f"TARGETDIR={OUTPUT.resolve()}"])
  File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['msiexec.exe', '/a', PosixPath('downloads/Universal CRT Headers Libraries and Sources-x86_en-us.msi'), '/quiet', '/qn', 'TARGETDIR=/home/ACER/msvc']' returned non-zero exit status 83.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at portable-msvc.py line 285 and inspect how the PosixPath and TARGETDIR arguments are passed to subprocess.check_call. Reproduce the shown msiexec.exe invocation with and without the attempted workaround, then trace the runtime's path translation behavior. Done means the MSI command receives usable Windows paths without producing the reported errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.