-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In container posix semantics #141
base: msys2-3.4.6
Are you sure you want to change the base?
Conversation
Deleting files returns STATUS_INVALID_PARAMETE on a bind mounted file system in hyper-v container with FILE_DISPOSITION_POSIX_SEMANTICS. Therefore fall back to default method. This code is suggeted by dscho and I change it more simple.
Renaming files returns STATUS_INVALID_PARAMETE on a bind mounted file system in hyper-v container with FILE_RENAME_POSIX_SEMANTICS. Disable the use_posix_semantics flag and retry.
I assume this issue also exists in upstream Cygwin. It might make sense to send this patch upstream to [email protected] and get their opinions/ideas, and hopefully get something applied there first. |
This is the thing I was stuck on, your solution seems neat to me. |
eb30798
to
a796047
Compare
a796047
to
749d3a2
Compare
I updated test https://ci.appveyor.com/project/YO4/test-msys2-in-container/builds/46532757 |
For lurkers, the Cygwin contribution can be seen here. |
@YO4 personally, I'd love to see the changes backported early into the MSYS2 runtime (once the jury has decided on |
Hmmm, I saw https://github.com/msys2/msys2-runtime/tags and mistakenly assumed that msys2-runtime would not be updated until cygwin's next release. |
I see that the upstream version is slightly different: 87ab6c7#diff-bf890865130314cb545fec4788e41d9daa5dd8832a21435c6556619d5578a8aaL740-R744 does not look like 749d3a2#diff-bf890865130314cb545fec4788e41d9daa5dd8832a21435c6556619d5578a8aaR739-R741 Other than that, I am totally in favor of merging it and incrementing the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YO4 can you make the change that @dscho mentioned in #141 (comment) so this can get merged?
goto out; | ||
debug_printf ("NtSetInformationFile (%S, FileDispositionInformationEx)" | ||
" returns %y with posix semantics. Disable it and retry.", | ||
pc.get_nt_native_path (), status); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
goto out; | |
debug_printf ("NtSetInformationFile (%S, FileDispositionInformationEx)" | |
" returns %y with posix semantics. Disable it and retry.", | |
pc.get_nt_native_path (), status); | |
{ | |
debug_printf ("NtSetInformationFile returns %y " | |
"with posix semantics. Disable it and retry.", status); | |
goto out; | |
} |
#59 complains that remove does not work in docker volume folder.
That seems to mounted folder does not support *_POSIX_SEMANTICS functions in hyper-v container.
https://ci.appveyor.com/project/YO4/test-msys2-in-container/builds/46432262
Since it is unclear how to determine in advance whether posix semantics will work, fall back to the conventional method when an error occurs.
Functions affected are unlink(), rename(), and their derivatives.