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>
25 lines
721 B
Diff
25 lines
721 B
Diff
From 73a99bcd0da2e401c6955d552f2bab185528c8d0 Mon Sep 17 00:00:00 2001
|
|
From: Ray Donnelly <mingw.android@gmail.com>
|
|
Date: Fri, 21 Aug 2015 09:52:47 +0100
|
|
Subject: [PATCH 14/N] Add debugging for strace make_command_line
|
|
|
|
---
|
|
winsup/utils/strace.cc | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc
|
|
index e7ac668..2fe3cac 100644
|
|
--- a/winsup/utils/strace.cc
|
|
+++ b/winsup/utils/strace.cc
|
|
@@ -352,6 +352,7 @@ create_child (char **argv)
|
|
flags |= CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP;
|
|
|
|
make_command_line (one_line, argv);
|
|
+ printf ("create_child: %s\n", one_line.buf);
|
|
|
|
SetConsoleCtrlHandler (NULL, 0);
|
|
/* Commit message for this code was:
|
|
--
|
|
2.28.0
|
|
|