-
Notifications
You must be signed in to change notification settings - Fork 491
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
Symlinks fail to extract in tar #1216
Comments
Interestingly this issue seems the opposite of #140. Has the default value for |
The default should be whatever works best on the given system (do when supported, native symlinks). lnk files go not work with the standard C library functions on Windows unfortunately. The are interpreted 'correctly' by Cygwin and Windows explorer only. |
@jeroen wrote:
..another workaround is to run tar two times:
|
extraction with bsdtar wasn't working due to symlinks in the source. Followed advice in github.com/msys2/issues/1216 and set MSYS="winsymlinks:lnk" in the environment. The symlinks don't matter anyway, since I explicitly replace them with copies.
I think I'm experiencing something similar:
And this errors occur on final steps of build:
Edit: After some builds, realize that BuildScriptsCommand need symlinks as shortcuts:
|
is not work in my case.
instead. |
Same issue here
workaround is working on my side |
|
As a workaround, try with ZIP file. |
could #3946 be related? |
Consider the following example:
This command fails in msys2. The reason is that the archive contains symlinks, but within the archive the symlink appears before the actual file that it links to. Therefore
tar
fails to resolve the link on-the-fly because it can't link to something that isn't there yet.The issue here is that the
R-3.4.4.tar.gz
file was created on macOS (withbsdtar
) which does not have a--sort
option. Hence random ordering of files within a tar is not illegal and very common.A workaround is the following:
set MSYS=winsymlinks:lnk tar -xf R-3.4.4.tar.gz
This will replace symlinks in the tar archive by windows shortcuts instead of trying to resolving them on the fly.
It took me two days to find this solution. Perhaps
MSYS=winsymlinks:lnk
should be the default intar
like it is in Cygwin? Or alternativelytar
should be modified to first extract real files before extracting symlinks.The text was updated successfully, but these errors were encountered: