[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19616: [Bug-tar] dist tarball contains hardlinks
From: |
Dimitrios Apostolou |
Subject: |
bug#19616: [Bug-tar] dist tarball contains hardlinks |
Date: |
Fri, 23 Jan 2015 15:44:26 +0100 (CET) |
User-agent: |
Alpine 2.10 (DEB 1266 2009-07-14) |
On Sun, 18 Jan 2015, Paul Eggert wrote:
Dimitrios Apostolou wrote:
But when the tarball is extracted, two files with same inode are created,
which
is kind of unexpected behaviour - at least for me
Other utilities have similar behavior (e.g., ls, cp, du), in that they
pretend the symlink isn't there and behave as if the pointed-to inode is
there directly. Tar's current behavior is compatible with these other
utilities, whereas its old behavior was incompatible.
Well out of the utilities you mentioned, only "cp" actually writes
something, so it's related to the issue with tar. So I tried the behaviour
of --dereference in cp:
$ touch blah
$ ln -s blah link_to_blah
$ cp --dereference link_to_blah blah2
The result is that "blah" and "blah2" have different inode! So
--dereference causes the symlink to be dereferenced to a separate file,
*not* to a hardlink of the source.
But in tar, --dereference causes a symlink to be dereferenced as a
hardlink to the source file. So how is their behaviour consistent? BTW, my
version of "cp" is:
$ cp --version
cp (GNU coreutils) 8.21
Thanks,
Dimitris
- bug#19616: dist tarball contains hardlinks, Dimitrios Apostolou, 2015/01/16
- bug#19616: [Bug-tar] dist tarball contains hardlinks, Paul Eggert, 2015/01/16
- bug#19616: [Bug-tar] dist tarball contains hardlinks, Joerg Schilling, 2015/01/19
- bug#19616: [Bug-tar] dist tarball contains hardlinks, Dimitrios Apostolou, 2015/01/23
- bug#19616: [Bug-tar] dist tarball contains hardlinks, Pavel Raiskup, 2015/01/23
- bug#19616: [Bug-tar] dist tarball contains hardlinks, Dimitrios Apostolou, 2015/01/26
- bug#19616: [Bug-tar] dist tarball contains hardlinks, Pavel Raiskup, 2015/01/27
- bug#19616: [Bug-tar] dist tarball contains hardlinks, Joerg Schilling, 2015/01/28
bug#19616: [Bug-tar] dist tarball contains hardlinks, Pavel Raiskup, 2015/01/21