Sergey Poznyakoff wrote:
Jose Miguel Goncalves <[email protected]> ha escrit:

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.

I must have overlooked the original report. Please, try the attached
patch. Let me know if it works for you.

It works!

$ /usr/local/bin/tar cPvf test.tar --transform="s,^basedir,,h" --show-stored-names basedir
/
/test
/test_link
$ /usr/local/bin/tar tPvf test.tar
drwxr-xr-x jmpg/jmpg         0 2009-06-25 16:49 /
-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 /test

But, when I give 'H' in the transformation scope flag it still does the transformation:

$ /usr/local/bin/tar cvPf test.tar --transform="s,^basedir,,H" --show-stored-names basedir
/
/test
/test_link
$ /usr/local/bin/tar tPvf test.tar
drwxr-xr-x jmpg/jmpg         0 2009-06-25 16:49 /
-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 /test

Only if I supply 'R' tar does not make the transformation:

$ /usr/local/bin/tar cPvf test.tar --transform="s,^basedir,,R" --show-stored-names basedir
basedir/
basedir/test
basedir/test_link
$ /usr/local/bin/tar tPvf test.tar
drwxr-xr-x jmpg/jmpg         0 2009-06-25 16:49 basedir/
-rw-r--r-- jmpg/jmpg         6 2009-06-25 13:13 basedir/test
hrw-r--r-- jmpg/jmpg 0 2009-06-25 13:13 basedir/test_link link to basedir/test

so, it seems that some bug(s) still persist.

Best regards,
José Gonçalves



Reply via email to