This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Future setup regression caused by 'mkdir: always check-for-existence' commit
- From: "Stephen Provine via cygwin" <cygwin at cygwin dot com>
- To: Ken Brown <kbrown at cornell dot edu>, "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Mon, 26 Aug 2019 22:13:19 +0000
- Subject: RE: Future setup regression caused by 'mkdir: always check-for-existence' commit
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0L3+NjBkQTD5ztnpsaePfjCt+AZ/4TYSRmSOcILD434=; b=djPXplzzchRT0Dc6u8alAKsn4sbLniLcXX1SiEdpSBUsEfhVq1AI5hoS1jcSKl55EtMWk93kPNCb6Rv0ZxnQPt5Ljynb4ppXN4d/NlPQHmMBr6o8jjh09HnIwWMDA4W0EVwSU2WY19O3Kmwy9BAxSFdMGlCG2dUHG13FxgmJ7GIP74mJqqPbxcAJ33NagGWDGDmx8XNUc43C8JZxy1Qmp49WP/Ud5Yp1PDAH6U0mldSl0/NREOuPRjE/nmkTf9Fqqqhr+7oHxeM4zOIws1xHB9cUxd0eO3AJJF9asc5UE7pz1Izb49ZdN7d7nqSGo1Og/1yyfPokYgJhInb/4ukOMw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZgwLeghHshVXq3vF0P/RCyOaT5yGHDaLSnauDp6iUHzZR6pte3teaGbRqtdMPkK5c92V7273VRaLDn4hlSRWbSi68o40y8JSxp6wUkY/MQgR+UYd/nRAZThuJYIqoQmxIg5sLFk2oFeT9mcwW+ZkNjOFC4h3r7P+7rZ2Szb+EywHoA4KB1hN3nmX5xuatIOp/WuNpP2VkGae7vqwn6NnZiPBtX0ddHbrCTfAwNSk6IExE5V5q7K53BOxUgyCRMjHkFqiBJ/RjzjnwwEM3UEJQNb9JTMgRC+tJHU+6gDTaj15j9XR+GV3WwuszeJNzjqwivvvWCGPTURgxmG/vz2rBw==
- References: <MWHPR21MB08452B51987E8A239851F7BEB9A10@MWHPR21MB0845.namprd21.prod.outlook.com> <860a3bd2-fc37-27c0-54f3-0fce8add7c24@cornell.edu> <MWHPR21MB0845636B4E90AAC4F4BF959EB9A10@MWHPR21MB0845.namprd21.prod.outlook.com> <d8ae01c9-ddf5-560e-2542-25a8d6943184@cornell.edu> <MWHPR21MB0845123AD4012BC4D100BE47B9A10@MWHPR21MB0845.namprd21.prod.outlook.com>
- Reply-to: Stephen Provine <stephpr at microsoft dot 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