|Summary:||tar task should be able to store symbolic links as links|
|Component:||Core tasks||Assignee:||Ant Notifications List <notifications>|
Description Martin 2002-12-10 17:27:42 UTC
If followsymlinks is true, symbolic links are followed and the referenced material will be stored in the tar file. Apparently if followsymlinks is false, symbolic links are not followed and NOTHING will be stored for them in the tar file. I would prefer that in this case symbolic links should be stored as relative or absolute pointers in the tar file. In my opinion this is the standard behaviour of GNU tar.
Comment 1 Gus Heck 2002-12-10 21:02:22 UTC
Though not strictly a duplicate, this bug is almost exactly the same issue as but 14320 Reading bug 1550 will also shed light on why this is quite a difficult problem to address. The symlink task provides a means by which to record links in an abosolute form, but this probably won't meet your needs unless you are untaring the tarballs with ant and can use the symlink task to recreate the links. Relative links are unfortunately impossible to percieve due to the limmitations of Java. I did find a fairly cool way to get relative links on linux though by recording and unpacking the links in a temp file that always resides in the exact same location in the filesystem. When you do this, you can exec "symlinks -rcs" in the top level directory twice before recording and twice after expansion to get identical relative links (mixed relative and aboslute would require creative use of apply and symlinks). If I find some time I hope to add this tip/trick in more explicit/clearer form to the docs for symlinks. Unfortunately, it is horribly platform/os specific though :(. I don't think all unicies have a symlinks command.