Hi All,
This is probably a philosophical/religious argument, but I contend that
the stripping of leading './' pairs from a symlink target is a bug. One
could argue that 'foo' and './foo' are semantically identical when being
interpreted as a path, but they are different strings and might be
interpreted differently by other software. But, it shouldn't be cpio's
job to change the contents of a symlink.
I ran into this because I'm using cpio to move trees under revision
control from one place to another. The changing of the symlink is
showing up as a metadata change.
To reproduce:
mkdir cpio-vs-cp ; cd cpio-vs-cp
mkdir orig
ln -s ./something orig/foo
ls -la orig
cp -a orig cp-out
ls -la cp-out
mkdir cpio-out; (cd orig; find . -print0 | cpio -ov -0 -H newc)
| (cd cpio-out; cpio -dvim)
ls -la cpio-out
Thanks,
-John Gregor