DO NOT REPLY [Bug 3692] regression: symlinks are created as hardlinks with --link-dest

samba-bugs at samba.org samba-bugs at samba.org
Mon Apr 17 17:41:48 GMT 2006


https://bugzilla.samba.org/show_bug.cgi?id=3692





------- Comment #3 from noreply at cpe-24-95-90-2.columbus.res.rr.com  2006-04-17 12:41 MST -------
not sure of the wording 'hardlinks symlink targets'.

a symlink target is not what a symlink '->' points '->' to.
 at least as the bsd man page defines it. linux calls it a
 destination.
a 'hardlink of symlink target' would be the thin air bit in the
bsd part below, or as it turns out, how linux does it.

=== bsd section ===
link(2)  -  link(const char *name1, const char *name2);
 the link() function call atomically creates the specified directory entry
(hard
 link) name2 with the attributes of the underlying object pointed at by name1.
ln(1)  -  ln source_file target_file

symlink(2)  -  symlink(const char *name1, const char *name2);
 a symbolic link name2 is created to name1 (name2 is the name of the file
 created, name1 is the string used in creating the symbolic link).
ln(1)  -  ln -s source_file target_file
http://www.freebsd.org/cgi/man.cgi?query=symlink&sektion=7

ls -aliT
 <nothing>
touch source0
ln -s source0 target0
ls -aliT
550260 -rw-r--r--  1 moo  moo    0 Apr 17 12:40:47 2006 source0
550261 lrwxr-xr-x  1 moo  moo    7 Apr 17 12:40:49 2006 target0 -> source0
*ln target0 trghrd0
ls -aliT          
550260 -rw-r--r--  2 moo  moo    0 Apr 17 12:40:47 2006 source0
550261 lrwxr-xr-x  1 moo  moo    7 Apr 17 12:40:49 2006 target0 -> source0
550260 -rw-r--r--  2 moo  moo    0 Apr 17 12:40:47 2006 trghrd0
note *:
 creates this entry [a hardlink of the source. link(2) follows the symlink and
 links(2)'s to the resulting underlying object, which is source0]
  550260 -rw-r--r--  2 moo  moo    0 Apr 17 12:40:47 2006 trghrd0
 rather than creating this one [a hardlink of the symlink itself [aka:
target]].
 i typed this line from thin air, it doesn't really exist on disk.
  550261 lrwxr-xr-x  1 moo  moo    7 Apr 17 12:40:49 2006 trghrd0 -> source0

=== linux section ===
ls -ali
 <nothing>
touch source0
ln -s source0 target0
ln target0 trghrd0
ls -ali
 254046 -rw-r--r--   1 moo moo   0 Apr 17 13:03 source0
 254047 lrwxrwxrwx   2 moo moo   7 Apr 17 13:03 target0 -> source0
 254047 lrwxrwxrwx   2 moo moo   7 Apr 17 13:03 trghrd0 -> source0

=== ===
so yeah, some sort of platform #define combined with filing the rest of
the block, char, fifo, sock types under a consistant link or don't link
action as described in comment#1 above as well would be great.


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the rsync mailing list