Skip to content

Commit

Permalink
msys2-runtime: update to v3.0.7 (3)
Browse files Browse the repository at this point in the history
Signed-off-by: Git for Windows Build Agent <ci@git-for-windows.build>
  • Loading branch information
Git for Windows Build Agent committed Jul 3, 2019
1 parent 62987ef commit 87375a0
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 3 deletions.
37 changes: 37 additions & 0 deletions msys2-runtime/0051-mkdir-always-check-for-existence.patch
@@ -0,0 +1,37 @@
From e0e7936faa74acea8cde0f89f464402515d1caad Mon Sep 17 00:00:00 2001
From: Ben Wijen <ben@wijen.net>
Date: Mon, 3 Jun 2019 20:15:50 +0200
Subject: [PATCH 51/N] mkdir: always check-for-existence
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

When using NtCreateFile when creating a directory that already exists,
it will correctly return 'STATUS_OBJECT_NAME_COLLISION'.

However using this function to create a directory (and all its parents)
a normal use would be to start with mkdir(â??/cygdrive/câ??) which translates
to â??C:\â?? for which it'll instead return â??STATUS_ACCESS_DENIEDâ??.
---
winsup/cygwin/dir.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc
index f43eae4..b757851 100644
--- a/winsup/cygwin/dir.cc
+++ b/winsup/cygwin/dir.cc
@@ -331,8 +331,10 @@ mkdir (const char *dir, mode_t mode)
debug_printf ("got %d error from build_fh_name", fh->error ());
set_errno (fh->error ());
}
+ else if (fh->exists ())
+ set_errno (EEXIST);
else if (has_dot_last_component (dir, true))
- set_errno (fh->exists () ? EEXIST : ENOENT);
+ set_errno (ENOENT);
else if (!fh->mkdir (mode))
res = 0;
delete fh;
--
2.9.0

9 changes: 6 additions & 3 deletions msys2-runtime/PKGBUILD
Expand Up @@ -4,7 +4,7 @@
pkgbase=msys2-runtime
pkgname=('msys2-runtime' 'msys2-runtime-devel')
pkgver=3.0.7
pkgrel=2
pkgrel=3
pkgdesc="Cygwin POSIX emulation engine"
arch=('i686' 'x86_64')
url="https://www.cygwin.com/"
Expand Down Expand Up @@ -73,7 +73,8 @@ source=('msys2-runtime'::git://sourceware.org/git/newlib-cygwin.git#tag=cygwin-$
0047-POSIX-ify-the-SHELL-variable.patch
0048-Make-paths-WCS-MBS-conversion-explicit.patch
0049-Handle-ORIGINAL_PATH-just-like-PATH.patch
0050-fixup-Pass-environment-variables-with-empty-values.patch)
0050-fixup-Pass-environment-variables-with-empty-values.patch
0051-mkdir-always-check-for-existence.patch)
sha256sums=('SKIP'
'e0d035187f4bc83cfca16c04275fac8e3dc8cfca06f7044853afc68d28abc3e2'
'7636f3264bcf904a1bb26678b74eb9c42c581e036527524e73c7a9ac35ff5111'
Expand Down Expand Up @@ -124,7 +125,8 @@ sha256sums=('SKIP'
'2ead8e17abac253ad7a77f5fd35a35373dab9f83ab4deb672f7e0a64d9a6c0d2'
'6c0f5b3448af0973cf9043ca0d78e2107fde014b8b4b7901466cc426b3ac8306'
'bc2c1fccefbade667ddc849b06b41d305ba648700d2f0db519cb5a4898d7a0b6'
'219667befe0a762f875be7f90134d75a08dd7eec935dd7e52e47bb1a3dc7d429')
'219667befe0a762f875be7f90134d75a08dd7eec935dd7e52e47bb1a3dc7d429'
'a0efa03b562c839824112ab898acd698d8cc9d953a692299ef088d1f3adfe54c')

# Helper macro to help make tasks easier #
del_file_exists() {
Expand Down Expand Up @@ -190,6 +192,7 @@ prepare() {
git am --committer-date-is-author-date "${srcdir}"/0048-Make-paths-WCS-MBS-conversion-explicit.patch
git am --committer-date-is-author-date "${srcdir}"/0049-Handle-ORIGINAL_PATH-just-like-PATH.patch
git am --committer-date-is-author-date "${srcdir}"/0050-fixup-Pass-environment-variables-with-empty-values.patch
git am --committer-date-is-author-date "${srcdir}"/0051-mkdir-always-check-for-existence.patch
}

build() {
Expand Down

0 comments on commit 87375a0

Please sign in to comment.