dra27 / mingw-w64-shims

Cygwin binary shim generator for opam-repository
ISC License
1 stars 0 forks source link

Null entry in the PATH #2

Open F-Loyer opened 2 weeks ago

F-Loyer commented 2 weeks ago

The opam file contains:

setenv: [
  [PATH += "%{_:runtime-x86_64}%"]
  [PATH += "%{_:runtime-i686}%"]
]

On my system the i686 tools set is absent, then these lines are transcribed by opam in its variable.sh as:

# Updated by package mingw-w64-shims
PATH='C:\Cygwin\usr\x86_64-w64-mingw32\sys-root\mingw\bin':"$PATH"; export PATH;
# Updated by package mingw-w64-shims
PATH='':"$PATH"; export PATH;

Then a null entry is inserted in the PATH. This can break some package (ocamlfind has an INSTALL file which is used instead of /usr/bin/install).

I am using opam 2.2.1.

dra27 commented 2 weeks ago

That's very strange - https://github.com/ocaml/opam/pull/5350 should be making that impossible!

F-Loyer commented 2 weeks ago

src/format/opamLineLexer.mll has changed since this PR.

the escape_spaces function and its substitution of "" to "@" have disappeared.

See https://github.com/ocaml/opam/blob/2.2.1/src/format/opamLineLexer.mll

This may explain it.