Package: rsync
Version: 2.6.4-6.0iwj.0.1 (nearly identical to 2.6.4-6)

-davenant:d> rm -rf src dst
-davenant:d> mkdir src dst
-davenant:d> ln -s target src/l
-davenant:d> ln -s target src/m
-davenant:d> ln src/l src/lh
-davenant:d> date >src/f
-davenant:d> ln src/f src/fh
-davenant:d> ll -i src/
total 11
 45818 drwxrwsr-x  2 ian ian 168 Jun 15 15:13 ./
 26523 drwxrwsr-x  4 ian ian  96 Jun 15 15:12 ../
291853 -rw-rw-r--  2 ian ian  29 Jun 15 15:13 f
291853 -rw-rw-r--  2 ian ian  29 Jun 15 15:13 fh
289727 lrwxrwxrwx  2 ian ian   6 Jun 15 15:12 l -> target
289727 lrwxrwxrwx  2 ian ian   6 Jun 15 15:12 lh -> target
291852 lrwxrwxrwx  1 ian ian   6 Jun 15 15:12 m -> target
-davenant:d> rsync -aH src/. dst/.
-davenant:d> ll -i dst/
total 11
287968 drwxrwsr-x  2 ian ian 168 Jun 15 15:13 ./
 26523 drwxrwsr-x  4 ian ian  96 Jun 15 15:12 ../
291859 -rw-rw-r--  2 ian ian  29 Jun 15 15:13 f
291859 -rw-rw-r--  2 ian ian  29 Jun 15 15:13 fh
291854 lrwxrwxrwx  1 ian ian   6 Jun 15 15:13 l -> target
291855 lrwxrwxrwx  1 ian ian   6 Jun 15 15:13 lh -> target
291856 lrwxrwxrwx  1 ian ian   6 Jun 15 15:13 m -> target
-davenant:d>

(reiserfs, Linux 2.4.23, system is otherwise pretty much sarge.)

This may seem irrelevant :-), but it causes my backup software to note
that there is a discrepancy between the original and the backup.  The
only behavioural distinction I can think of between the two is that
lchown would chowns two hardlinked symlinks in one go.

Note that on some systems, link(2) follows the source symlink, so that
it is impossible to make hardlinks to symlinks, even if the filesystem
structure would be able to represent such a thing.  Even worse, with
the increasing prevalence of foreign file system access facilities, it
might be possible to have a situation where a hardlinked symlink is
visible in the filesystem, but no such object can be created there
with the currently running system.  And finally of course there are
bugs: at least one version of Linux would attempt to follow the link
source symlink, and fail if it couldn't, but if it succeeded would
then a hardlink to the symlink anyway, rather than to its target !

So there are some tricky portability questions involved in fixing
this.  I don't have very clear answers but I thought a bug report here
would be a good way to at least document the situation until we decide
what should be done about it.

For now an entry in the BUGS section of the manpage might be a good
idea.

Regards,
Ian.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to