delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/01/04/10:28:14

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7D5B7388A035
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1609774046;
bh=CB9w6CSWK9UFpm+Kx+FRS1PUJRGo4FaRPaM6oUmGjqY=;
h=References:In-Reply-To:Date:Subject:Cc:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=XlIPYUAYhyX7wKPkXzVWj2fe1awI5yeBj6jTAughkLfZdMkZmm2H/SpcRGy0tHvTp
jXA4KtTSfrIG9xVZt8gnoaO7MDYpm6JP6/YRCJIcOwwLlbh6MSyQaAuYbOWwFUcV/Z
7BBnvRSOPqzEIFfPzXj8xLJZH1XyDRvcDu7D1nXk=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 56172388701E
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:cc;
bh=PYbivkKCiqB/UaS1x4VIDTZTs1rSSNoDATsMBt6ktAg=;
b=lHKBl4cxt/HR7vkl7xE9xw+vvnFjY5V1LjcqmeLtURb/5POyXkd/hUH5FM9dJNahCY
U6f+o44EeTMLzV2n4zCm9ab4KVVFuMZHgheQe7MTKYtbbstnxOzJ2mGwS4t3Eo3Zq4QT
0UE9+wa7SBhd6Njx5Fh+iekz2U57LrCxxf4yscxwRZtKWxW/LsUXL2ZZ7qecEtrVsxFb
oSOxjLql03SBUGxgBOUeyqJGxpw2fc0I7bfOaj26oecIsxOGshCpmos4+WHNDN3R8E+H
e+VwDwJRv4jSR+4vL81Pzi8mvIVRrwwT1AKdLGll7mUcPWuXOvsLcz6lPkImFp7Rp+ks
HEZw==
X-Gm-Message-State: AOAM532u6Irl33B0XsdG0EhbKsM5IUVlVCNMNDOPo0EMxFHdREKwDkCo
3cKP8l/W8wBNsuG39ckmxgz/7qZbmLYTTHse7oUoOQbzefTWBw==
X-Google-Smtp-Source: ABdhPJyEMqVCUVMg8pseDTMwoAVI4wWjPa+CCD2RICxV3wYMfAv1DYj0TeN7LT3Zn80p9rSj9fW/6k8S+/DHtw4+cX4=
X-Received: by 2002:a19:4242:: with SMTP id p63mr30653567lfa.609.1609774041872;
Mon, 04 Jan 2021 07:27:21 -0800 (PST)
MIME-Version: 1.0
References: <CAC+X2=J-mKZH7WAdt2RQocqP+4rUqSkGi-acDC7U3N=uu7QGDA AT mail DOT gmail DOT com>
<1d853aa0-4cbe-b92c-8d9f-53fc72371a7b AT SystematicSw DOT ab DOT ca>
<CAC+X2=L2tCUSUYreh2oTSt33Zn295Boru6eAPfkckksKXnB4vQ AT mail DOT gmail DOT com>
<2f9a63f8-37e3-5ea0-1541-608cf59faffa AT cs DOT umass DOT edu>
In-Reply-To: <2f9a63f8-37e3-5ea0-1541-608cf59faffa@cs.umass.edu>
Date: Mon, 4 Jan 2021 10:27:09 -0500
Message-ID: <CAC+X2=L-sBmgi_OoFVjJtpPp6MszHGH8ycEiOo4V1NNbWDAP-A@mail.gmail.com>
Subject: Re: Native symbolic link behavior is broken and makes backups using
Cygwin command line tools impossible
Cc: cygwin AT cygwin DOT com
X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, MALFORMED_FREEMAIL,
MISSING_HEADERS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: "Matt D. via Cygwin" <cygwin AT cygwin DOT com>
Reply-To: "Matt D." <codespunk AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

I think there is a misunderstanding with how to set up your
environment to reproduce my test cases. I did state in the subject
"native symbolic links" but I can see that this can be misinterpreted
and I should have clarified.

I am using symbolic links native to Windows. My CYGWIN environment
variable has been set to "winsymlinks:nativestrict" and my account has
permission to make symbolic links. This is an issue specifically with
Cygwin; I have no problems making links at the windows command line.
Cygwin also does not have a problem making symbolic links-- if the
target already exists. The issue is that I cannot create native
symbolic links with Cygwin for targets that DON'T exist.

The normal behavior for both Windows and Linux is to create the
symbolic link whether the target exists or not. I don't know why
Cygwin fails to do this only for native Windows symbolic links. It
does not have a problem creating links to any target with the default
Cygwin (non-Windows) symbolic links.

On Mon, Jan 4, 2021 at 7:30 AM Eliot Moss <moss AT cs DOT umass DOT edu> wrote:
>
> On 1/4/2021 5:36 AM, Matt D. via Cygwin wrote:
>  > Did you try any of my test cases? This can't and doesn't work for the
>  > reasons I outlined in my previous message:
>  >
>  > $ cp -av folder_a/a folder_b/
>  > 'folder_a/a' -> 'folder_b/a'
>  > cp: cannot create symbolic link 'folder_b/a': No such file or directory
>  >
>  > $ cp -dv folder_a/a folder_b/
>  > 'folder_a/a' -> 'folder_b/a'
>  > cp: cannot create symbolic link 'folder_b/a': No such file or directory
>  >
>  > $ cp -Pv folder_a/a folder_b/
>  > 'folder_a/a' -> 'folder_b/a'
>  > cp: cannot create symbolic link 'folder_b/a': No such file or directory
>
> So did you mkdir folder_b first?  I don't think cp will create it for you.  I
> tried the commands above with folder_b not existing and got the behavior you
> indicated, but when I created folder_b first, all three cp commands worked.
> This overall behavior does not surprise me.
>
> On the other hand, if I have folder_b non-existing and do (e.g.)
>
> cp -rav folder_a folder_b
>
> then it _does_ create folder_b, and also copies the links.
>
> HTH - Eliot Moss
> --
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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