GNU bug report logs - #19616
dist tarball contains hardlinks

Previous Next

Package: automake;

Reported by: Dimitrios Apostolou <jimis <at> gmx.net>

Date: Fri, 16 Jan 2015 15:44:02 UTC

Severity: normal

Full log


Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dimitrios Apostolou <jimis <at> gmx.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: bug-automake <at> gnu.org, bug-tar <at> gnu.org
Subject: Re: [Bug-tar] dist tarball contains hardlinks
Date: Fri, 23 Jan 2015 15:44:26 +0100 (CET)
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





This bug report was last modified 10 years and 93 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.