In MSYS2 <-> MINGW transitions, we convert a couple of environment
variables between Unix and Windows styles, most notably `PATH`.
In the Git for Windows project, we realized that the environment
variables `SHELL` and `ORIGINAL_PATH` need the same treatment. These
patches have proved their worth for years, and it is time for them to be
integrated back into the actual MSYS2 runtime.
This should fix https://github.com/msys2/msys2-runtime/issues/43.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
For now adds a "provides=(msys2-devel)" to gcc to keep installation
working and install the same set of packages.
Next step is to makedepend on gcc where needed and remove msys2-devel
from the docs.
In some cases this will introduce cycles which could likely be cleaned
up by only depending on some unix tools instead of the whole autotools.
Rebuilding doesn't make much sense at this point since it just adds a subset
of base-devel which is still installed by default.
As long as the return value of `CtrlRoutine` indicates that it has been
handled, do not insist on the process to go away. This is in line with
`SIGINT` handlers on Linux/Unix/macOS that can prevent the process from
terminating on the process' side.
This brings over https://github.com/msys2/msys2-runtime/pull/50 into
MSYS2-packages.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The idea is that we handle Ctrl+C not by terminating the processes
(which would reflect `kill -KILL`, not `kill -INT`) but by imitating
what Windows does in a CMD window: we inject a remote thread that runs
the `CtrlRoutine` function. This lets the `atexit()` handlers and the
ConsoleCtrlEvent handlers do their job.
This commit brings the goodness from
https://github.com/msys2/msys2-runtime/pull/31 over into MSYS2-packages,
which cherry-picked and edited the patches from Git for Windows.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This patch synchronizes msys2/MSYS2-packages/msys2-runtime with
msys2/msys2-runtime after merging
https://github.com/msys2/msys2-runtime/pull/16.
We specifically override Cygwin's symlink() behavior to make deep copies
instead of creating a special-crafted system file that Cygwin (MSYS2,
and only those two) will recognize as symbolic link.
The patch to override this behavior is incomplete, though: it hacks up
the WSYM_sysfile code path, which causes all kinds of problems:
- Contrary to the documentation, MSYS=winsymlinks:native won't fall back
to creating Cygwin-style symbolic links. Instead, it (quite
surprisingly) creates deep copies instead.
- There is no way to opt into the original Cygwin behavior because that
code path is now dead code.
- The fact that the WSYM_sysfile code path is modified to do something
very different from what it is intended to do means that all changes
that Cygwin makes to that code path have to be inspected, and
occasionally even more hacks have to be put on top, such as 44bb133,
where we specifically had to disable Cygwin's code to try creating WSL
symlinks before falling back to creating system files instead).
Let's fix this by introducing a proper new mode:
MSYS=winsymlinks:deepcopy. This mode is made the default so
that users should be unaffected by this PR.
Users wishing to let the MSYS2 runtime create Cygwin-style
symbolic links can ask for that by setting
MSYS=winsymlinks:sysfile.
By fixing this issue, we can now stop disabling Cygwin's WSL
symlink behavior, too: it is in the sysfile code path and
won't affect the default behavior of the MSYS2 runtime.
While at it, the indentation of the original patch is fixed,
too.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>