symbolic links cannot be preserved by ant tar

Z

zyng

Hi:

I just found that when using the ant task "tar" to create a tar file, the links can not be preserved -- this is different from GNU tar feature.

In another words, if the directory to be tarred containing:

libfoo.so --> libfoo.so.0
libfoo.so.0 --> libfoo.so.0.4
libfoo.so.0.4
(very common scenario in shared object library files in *nix OS)

By default(followsymlinks is true), when I tarred and untarred the created tar file, there will be 3 identical files with different names:

libfoo.so
libfoo.so.0
libfoo.so.0.4

This is considered a bug by Ant developers:

https://issues.apache.org/bugzilla/show_bug.cgi?id=15244

https://issues.apache.org/bugzilla/show_bug.cgi?id=14320

I am wondering if there is a solution now, or I have to live with it.

Thank you very much.
 
A

Andreas Leitgeb

zyng said:
I just found that when using the ant task "tar" to create a tar file, the links can not be preserved -- this is different from GNU tar feature.

Maybe you can get ant to call (gnu-)tar directly, instead of using the
tar task?

Not an ant expert, myself, and only answering because I don't see any
other reply, yet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top