bug-gnu-utils
[Top][All Lists]
Advanced

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

Tar bug ? Problem with hard links


From: Simon Derr
Subject: Tar bug ? Problem with hard links
Date: Thu, 11 Oct 2001 12:56:57 +0200 (MEST)

        Hi,

I've run into what might be a bug in recent versions of tar.
I use tar for the cloning of Linux partitions, and I found that my app did work
with tar 1.13.17 but not with 1.13.19, and the problem is that tar fails to
create hard links correctly.

As an example, on Linux :

tar c /usr/share/zoneinfo | (cd /tmp/foo && tar x)
-> works OK with tar 1.13.17
-> with 1.13.19 : I get lots of 'tar: usr/share/zoneinfo/US/Samoa: Cannot link
to usr/share/zoneinfo/US/Samoa: Invalid cross-device link;

My guess is that tar 1.13.19 forgets to remove the leading '/' in the hard links
(not symlinks) names.
running strace shows for example :

link("/usr/share/zoneinfo/Etc/UTC", "usr/share/zoneinfo/Zulu") = -1 EXDEV
(Invalid cross-device link)

Since I found no way in the manpage to change this
behaviour, I suppose this is not a feature but a bug.

        Simon.

-- 
Simon Derr         address@hidden
Tel: 04 76 61 20 41
Informatique et distribution
ENSIMAG - Antenne de Montbonnot
ZIRST - 51, avenue Jean Kuntzmann
38330 MONTBONNOT SAINT MARTIN






reply via email to

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