public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Stephen Provine via cygwin" <cygwin@cygwin.com>
To: Ken Brown <kbrown@cornell.edu>, "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: RE: Future setup regression caused by 'mkdir: always check-for-existence' commit
Date: Tue, 27 Aug 2019 12:51:00 -0000	[thread overview]
Message-ID: <MWHPR21MB08455DEBE780ABD74CA7BFB5B9A10@MWHPR21MB0845.namprd21.prod.outlook.com> (raw)
In-Reply-To: <MWHPR21MB0845123AD4012BC4D100BE47B9A10@MWHPR21MB0845.namprd21.prod.outlook.com>

On 8/26/2019 1:33 PM, Ken Brown wrote:
> I don't think you understand the logic change in that commit.  An attempt to create an existing directory would already fail before that commit; the failure would occur in the call to fh->mkdir().  The commit in question simply guarantees that the error code is EEXIST.  Take a look at the commit message.

I installed the current release of Cygwin with all the default packages (so cygwin package version 3.0.7-1) and tested the scenario that Git for Windows runs into, which is that prior to running its post-install script (https://github.com/git-for-windows/git-sdk-64/blob/master/etc/post-install/01-devices.post), there is no "dev" directory present on the host Windows machine (I just renamed it to "dev2" before running Cygwin.bat). Running "mkdir -m 0755 /dev" in Cygwin *succeeds* with exit code 0. I then deleted that installation and installed Cygwin again, only changing the cygwin package version to 3.1.0-0.2 (test). Tried the same scenario again and "mkdir -m 0755 /dev" fails with the error " mkdir: cannot create directory '/dev': File exists".

I should also point out that this change in behavior starts not in 3.1.0 but in 3.0.7-3, and in-between 3.0.7-1 and 3.0.7-3 the commit I mention seemed like the most reasonable reason for it.

All this said, Cygwin succeeds in both cases. And now that I look, I think the Cygwin setup program explicitly creates "/dev" as a standard directory so it avoids this change in behavior.

Given that the new behavior is obviously correct, I assume this means there is nothing for Cygwin to do, and the fix is for Git for Windows to explicitly create this directory.

Thanks,
Stephen

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

  parent reply	other threads:[~2019-08-26 22:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26 15:41 Stephen Provine via cygwin
2019-08-26 17:04 ` Eric Blake
2019-08-26 17:33 ` Ken Brown
2019-08-26 18:24   ` Stephen Provine via cygwin
2019-08-26 18:24     ` Ken Brown
     [not found]       ` <MWHPR21MB0845123AD4012BC4D100BE47B9A10@MWHPR21MB0845.namprd21.prod.outlook.com>
2019-08-27 12:51         ` Stephen Provine via cygwin [this message]
2019-08-27 17:54           ` Achim Gratz
2019-08-26 22:13 ` Achim Gratz

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=MWHPR21MB08455DEBE780ABD74CA7BFB5B9A10@MWHPR21MB0845.namprd21.prod.outlook.com \
    --to=cygwin@cygwin.com \
    --cc=kbrown@cornell.edu \
    --cc=stephpr@microsoft.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).