public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [PATCH setup 0/2] Add option to choose symlink type
@ 2021-05-23 18:27 Jon Turney
  2021-05-23 18:27 ` [PATCH setup 1/2] Add support for creating WSL symlinks Jon Turney
  2021-05-23 18:27 ` [PATCH setup 2/2] Add a command line option to choose symlink type used Jon Turney
  0 siblings, 2 replies; 3+ messages in thread
From: Jon Turney @ 2021-05-23 18:27 UTC (permalink / raw)
  To: cygwin-apps; +Cc: Jon Turney

This is an initial attempt at adding an option to setup to choose the
symlink type used. The default behaviour is left as creating magic-type
symlinks, as setup currently does.

The idea being that since Cygwin (since 3.1.5) creates WSL symlinks, if
possible, and there's presumably some value over magic symlinks in doing
that, setup should be consistent.

This could be extended to shortcut and native symlinks (which are the kind
which would actually be useful, if they didn't have the all the problems
they do).

This doesn't propagate the chosen setting into post-install scripts using
'CYGWIN=winsymlinks:<something>', because equivalent values of <something>
don't exist (currently), so you still don't get consistent behaviour.

Ideally, we'd have the default option be 'do the same thing as Cygwin does'
(but that's quite complex [as Cygwin embeds some knowledge about what's best
for some filesystem types] and is possibly a moving target), but 'try to
make WSL symlink and fallback to magic if that fails' is probably a better
default choice than insisting on one type.

(Orthogonally, there's still the (long-standing) issue that setup only
considers the mount table, and completely ignores Cygwin symlinks when
creating files (e.g. if you have /usr/share symlinked to
/cygdrive/d/somewhere/, and install a package with some files under
/usr/share, it's just going to ignore that and try to create files using the
Windows path it thinks is right.)

Jon Turney (2):
  Add support for creating WSL symlinks
  Add a command line option to choose symlink type used

 inilintmain.cc |   7 +++
 main.cc        |  29 +++++++++++
 mklink2.cc     | 139 +++++++++++++++++++++++++++++++++++++++++++++++--
 mklink2.h      |  10 ++++
 4 files changed, 182 insertions(+), 3 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-23 18:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-23 18:27 [PATCH setup 0/2] Add option to choose symlink type Jon Turney
2021-05-23 18:27 ` [PATCH setup 1/2] Add support for creating WSL symlinks Jon Turney
2021-05-23 18:27 ` [PATCH setup 2/2] Add a command line option to choose symlink type used Jon Turney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).