Bug 46997 - hard links are not kept proberly
Summary: hard links are not kept proberly
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tar
Version: 7.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact: Ben Levenson
Depends On:
TreeView+ depends on / blocked
Reported: 2001-07-02 15:57 UTC by Rached Ben Mustapha
Modified: 2007-04-18 16:34 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2004-10-20 08:52:45 UTC

Attachments (Terms of Use)
tar hard link bug resolution (709 bytes, patch)
2001-09-18 02:26 UTC, Jose Pedro Oliveira
no flags Details | Diff

Description Rached Ben Mustapha 2001-07-02 15:57:29 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2+) Gecko/20010701

Description of problem:
when i create a tar archive with some files hard-linked between them, some
have the leading '/' in their name, causing the file to be hard-linked with
the wrong inode when un-tarred.

How reproducible:

Steps to Reproduce:
1. cd /tmp; tar cf foo.tar /bin
2. mkdir test; cd test
3. tar xf /tmp/foo.tar
4. ls -li bin/*awk*
5. ls -li /bin/*awk*

- or -

1. tar tvf /tmp/foo.tar

Actual Results:  "tar tvf /tmp/foo.tar" gives
-rwxr-xr-x root/root 157884 2000-08-16 19:26:13 bin/gawk-3.0.6
-rwxr-xr-x root/root 0 2000-08-16 19:26:13 bin/gawk link to /bin/gawk-3.0.6


in the un-tarred bin directory, gawk has the i-node number of /bin/gawk-3.0.6

Expected Results:  "tar tvf /tmp/foo.tar" should give "bin/gawk link to


in the un-tarred bin directory, gawk should have the same i-node number as
gawk-3.0.6 in the same directory

Additional info:

1. tar version is 1.3.19
2. when restoring an archive and modifying a file that was badly linked,
the wrong file is modified, so data loss can occur.

Comment 1 Jose Pedro Oliveira 2001-09-18 02:26:50 UTC
Created attachment 31959 [details]
tar hard link bug resolution

Comment 2 Tim Powers 2002-04-09 16:32:03 UTC
Bero: was there a reason for the pulling back from the 1.13.25 packages? Is this
one that missed the rebuilds in February?


Comment 3 Bernhard Rosenkraenzer 2002-04-09 16:33:45 UTC
Yes, it was missed in the mass rebuild.

Note You need to log in before you can comment on or make changes to this bug.