public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Strange behaviour with winsymlinks:native
@ 2020-10-14 14:56 David Allsopp
  2020-10-15  8:37 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: David Allsopp @ 2020-10-14 14:56 UTC (permalink / raw)
  To: 'cygwin'

I've been doing some working around the problems with Cygwin 3.1.5+ WSL
junction points in Docker and found three unexpected pieces of behaviour
with CYGWIN=winsymlinks:native

In all cases, these work as expected with the default symlink behaviour
(i.e. CYGWIN unset or without a winsymlinks option).

1. Relative paths get unnecessarily resolved

  mkdir -p foo/bar
  cd foo/bar
  touch baz
  CYGWIN='winsymlinks:native' ln -s ../bar/baz link
  readlink link

Result is baz, not ../bar/baz

2a. Links in the magic mount directories (/usr/bin and /usr/lib) get extra
bits added (source is a default mount):

  cd /usr/lib
  CYGWIN='winsymlinks:native' ln -s ../share/terminfo terminfo2
  readlink terminfo2

Result is ../usr/share/terminfo, which makes it valid from /lib (the "real"
directory) but not in the virtual one

2b. Same but where target is a default mount

  cd /usr/libexec/p11-kit
  CYGWIN='winsymlinks:native' ln -s ../../bin/update-ca-trust
trust-extract-compat2
  readlink trust-extract-compat2

Result is ../../../bin/update-ca-trust, again it seems to be computing an
extra level back to the "real" lib directory

Are these behaviours expected? I can create those symbolic links manually
with mklink with no problem, so I'm wondering if it's an outright bug or an
unexpected consequence of something else.

Thanks!


David


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

end of thread, other threads:[~2020-10-15  8:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 14:56 Strange behaviour with winsymlinks:native David Allsopp
2020-10-15  8:37 ` Corinna Vinschen

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).