bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] dereferencing broken since 1.24?


From: Joerg Schilling
Subject: Re: [Bug-tar] dereferencing broken since 1.24?
Date: Thu, 06 Jan 2011 10:29:27 +0100
User-agent: nail 11.22 3/20/05

Paul Eggert <address@hidden> wrote:

> On 01/05/11 13:58, Michael Lawrence wrote:
>
> > If I understand you correctly, with -h there should be no links
> > within the archive, i.e., there are two copies of foo in the
> > archive. This is not how tar >= 1.24 behaves.
>
> I'm afraid it's not that simple.  -h prevents *soft* links in the
> archive, but it doesn't prevent *hard* links:
>
>   $ touch foo
>   $ ln foo foo-hard
>   $ ln -s foo foo-soft
>   $ ls -l foo-hard foo-soft
>   -rw-r--r-- 2 eggert eggert 0 Jan  5 15:02 foo-hard
>   lrwxrwxrwx 1 eggert eggert 3 Jan  5 15:03 foo-soft -> foo
>   $ tar chf x.tar foo-hard foo-soft
>   $ tar tvf x.tar
>   -rw-r--r-- eggert/eggert     0 2011-01-05 15:02 foo-hard
>   hrw-r--r-- eggert/eggert     0 2011-01-05 15:02 foo-soft link to foo-hard
>
> This behavior is the same in tar 1.22 and 1.25 (I just checked).
>
> What's different in tar 1.24 and later, is that tar's behavior
> does not change based on whether foo-hard's link count is
> 2 or more.  As Joerg Schilling notes, earlier versions of GNU tar
> treat foo-soft differently if foo-hard's link count is 1.  However,
> this was a bug in GNU tar.

All tar implementations I am aware of behave different in this case depanding 
on whether the link count of foo is >= 2. I cannot see a "bug" for this reason.

It seems that GNU tar now indeed differs from tar.

Jörg

-- 
 EMail:address@hidden (home) Jörg Schilling D-13353 Berlin
       address@hidden                (uni)  
       address@hidden (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily



reply via email to

[Prev in Thread] Current Thread [Next in Thread]