delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/09/06/04:53:06

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:cc:subject:date:message-id
:mime-version:content-type:content-transfer-encoding; q=dns; s=
default; b=PXNFPhTZcCYOjD/1Aurrw77n547Ry2RUn8boNr4AZzAzf7ctWlkNi
CZVxWG7UbJtrESHjJx0AaAfryfyyXIg407xzu2JmifRbHEhl56S2rwrz+pSS+pQ/
eP2J+eCLaikknuT745FwpE0fl8Wbsz8dXSMZWi+NyF0hPhnGG11d9U=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:cc:subject:date:message-id
:mime-version:content-type:content-transfer-encoding; s=default;
bh=cEcu9UUM7VbR9XYFUmKsUA1nHgc=; b=vvx/Q4EX13xdbUQVaxlhKH8cNahY
4Mvn1Kb91KUVW3lLSg18WaMN+soXXDKdmiDVeLfUhLwEnjMFUgqmNH5w3SUMV/WN
Ja7BEwFdZBU63WVbGQ+rUZ95ujGycIHvZk7x4UxH12P/DsA3S3cNca3jQ3ysZoyf
SI5rLT4Z4J9icZQ=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:sk:NAM02-S, CYGWIN, HX-HELO:sk:NAM02-S, H*RU:sk:NAM02-S
X-HELO: NAM02-SN1-obe.outbound.protection.outlook.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purdue0.onmicrosoft.com; s=selector1-purdue-edu; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eH2zBXUHTaQSKgznTg5hqR4G4lvKvxVBYAskw2v6Af0=; b=fMoTuSrJSI7NiJHUssxjoYavcTG22m28itw/2qFwCPMijaxHBRsTyHYSWkfz0Pp9or6HgRVny4g0IFacBLN7huwu1Nn/8PVDsvrmQfR4PC1N290p0OSKA5uEHI5FSH7x4gO3ZYY5RQVhP6SKv2LnpiAxfGDW8FFOeUJ0NLC1rkg=
From: Paul Townsend <aab AT purdue DOT edu>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
CC: Paul Townsend <aab AT purdue DOT edu>
Subject: Semantic difference with/without CYGWIN=winsymlinks:nativestrict
Date: Thu, 6 Sep 2018 08:46:24 +0000
Message-ID: <MWHPR22MB0288A164791C41C488307F23C1010@MWHPR22MB0288.namprd22.prod.outlook.com>
authentication-results: spf=none (sender IP is ) smtp.mailfrom=aab AT purdue DOT edu;
received-spf: None (protection.outlook.com: purdue.edu does not designate permitted sender hosts)
MIME-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id w868r4Ki028707

Attempts to make symlinks are handled differently depending on (1) whether or not the target file pre-exists and (2) whether or not CYGWIN=winsymlinks:nativestrict is exported.  Actually,  'ln' seems to require the pre-existence as if it were a hard link attempt when CYGWIN is defined.  FWIW -  'ln' on Ubuntu 18.04 on WSL (Windows Subsystem for Linux) allows the target to be nonexistent.

The following is a very simplistic example:


 $ unset CYGWIN

 $ rm a b

 $ ln -s a b

 $ ls -l a b

 ls: cannot access 'a': No such file or directory
 lrwxrwxrwx 1 aab None 1 Sep  6 03:45 b -> a       <=<=< not a "real" Windows type symlink
 $ export CYGWIN=winsymlinks:nativestrict
 $ rm a b
 $ ln -s a b
 ln: failed to create symbolic link 'b': No such file or directory
 $ rm a b
 rm: cannot remove 'a': No such file or directory
 rm: cannot remove 'b': No such file or directory
 $ touch a
 $ ln -s a b
 $ ls -l a b
-rw-r--r-- 1 aab None 0 Sep  6 03:55 a
lrwxrwxrwx 1 aab None 1 Sep  6 03:55 b -> a
 $ rm a b

Found above when I downloaded the source for 'bash-4.4' and 'cygport'/'tar' attempted to make the symlink
    bash-4.4/ChangeLog -> [bash-4.4/]CWRU/changelog
which did not yet exist.  The error message is a bit confusing but it implies that the destination must pre-exist in order for the symlink to be made.  FWIW - With CYGWIN exported as shown above, 'ln' does create real symlinks as verfied by Windows 10 File Explorer.

--    Thanks



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019