-
Notifications
You must be signed in to change notification settings - Fork 37
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
Synlinks: error when extracting archives built with --dereference #19
Comments
Ah, keter is not using the bundled So, that should be fixed on keter's side, but the bug here still stands. Perhaps it is a documentation bug. |
The tar package does not create symlinks (partly because this is not supported on other systems and it's not supported by the directory package). It emulates them in a way that's portable to other platforms like windows by copying the files that are the target of the symlink but this does depend on the order of the files within the archive. If the symlink target is unpacked first then it's ok, but if it's unpacked later then it fails. What would you suggest? That we emulate it better by maintaining a map of symlinks as we unpack and copy once at the end? Or that we use genuine symlinks on platforms that support it and do what on windows? Up to know the tar package has mainly been there to support portable archives, rather than arbitrary platform-specific archives. |
@jwaldmann ping ^^ if you have any opinion on this, that'd be most welcome. |
Symlinks have been supported by https://hackage.haskell.org/package/directory-1.3.1.1/docs/System-Directory.html#v:createFileLink |
Such things are allowed, no? I mean it's a bit silly perhaps but I think one can e.g. put a file before the directory containing it. |
Probably fixed in #77, at least the reproducer does not fail any more for me. |
When I build an archive with gnu tar, using
--dereference
, it cannot be unpacked by haskell-tar.Simple test case is here: https://gitlab.imn.htwk-leipzig.de/waldmann/check-tar
This is creating a problem with keter, cf. snoyberg/keter#146
The text was updated successfully, but these errors were encountered: