public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "David Allsopp" <David.Allsopp@cl.cam.ac.uk>
To: "'cygwin'" <cygwin@cygwin.com>
Subject: Strange behaviour with winsymlinks:native
Date: Wed, 14 Oct 2020 15:56:47 +0100	[thread overview]
Message-ID: <001001d6a23a$3d5ebc70$b81c3550$@cl.cam.ac.uk> (raw)

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


             reply	other threads:[~2020-10-14 14:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14 14:56 David Allsopp [this message]
2020-10-15  8:37 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001001d6a23a$3d5ebc70$b81c3550$@cl.cam.ac.uk' \
    --to=david.allsopp@cl.cam.ac.uk \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).