[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] hard links and --transform
From: |
Jose Miguel Goncalves |
Subject: |
Re: [Bug-tar] hard links and --transform |
Date: |
Thu, 25 Jun 2009 17:00:12 +0100 |
User-agent: |
Thunderbird 2.0.0.21 (X11/20090409) |
Sergey Poznyakoff wrote:
Jose Miguel Goncalves <address@hidden> 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