Hi,

I'm facing the same problem reported back in March, 17 by Wouter Verhelst, regarding storing hard links in tar using --transform.
I'm using tar 1.22. Check the following example:

$ mkdir basedir
$ echo "hello" > basedir/test
$ ln basedir/test basedir/test_link
$ ls -li basedir
total 8
500331 -rw-r--r-- 2 jmpg jmpg 6 2009-06-25 13:13 test
500331 -rw-r--r-- 2 jmpg jmpg 6 2009-06-25 13:13 test_link
$ tar cvf test.tar --transform="s,^basedir,,h" --show-stored-names basedir
/
/test
/test_link
$ tar tPvf test.tar
drwxr-xr-x jmpg/jmpg         0 2009-06-25 13:14 /
-rw-r--r-- jmpg/jmpg         6 2009-06-25 13:13 /test
hrw-r--r-- jmpg/jmpg 0 2009-06-25 13:13 /test_link link to basedir/test

So, the hard link does not reference the correct path and it will not be created when extracting.

Is this a bug or am I doing something wrong?

Best regards,
José Gonçalves



Reply via email to