From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by sourceware.org (Postfix) with ESMTPS id 56172388701E for ; Mon, 4 Jan 2021 15:27:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 56172388701E Received: by mail-lf1-x132.google.com with SMTP id h22so65273309lfu.2 for ; Mon, 04 Jan 2021 07:27:23 -0800 (PST) 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: <1d853aa0-4cbe-b92c-8d9f-53fc72371a7b@SystematicSw.ab.ca> <2f9a63f8-37e3-5ea0-1541-608cf59faffa@cs.umass.edu> In-Reply-To: <2f9a63f8-37e3-5ea0-1541-608cf59faffa@cs.umass.edu> From: "Matt D." Date: Mon, 4 Jan 2021 10:27:09 -0500 Message-ID: Subject: Re: Native symbolic link behavior is broken and makes backups using Cygwin command line tools impossible Cc: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2021 15:27:24 -0000 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 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