[Bug 522856] Re: -h option does not do what is expected

Daniel Manrique daniel.manrique at canonical.com
Fri Nov 25 17:08:47 UTC 2011


Hi,

Thank you for taking the time to report this bug and helping to make
Ubuntu better.

I tried reproducing the bug as per your instructions but I was unable to
do so. I also think the behavior you expect in your second command (tar
-hxf testfile.tar) is not correct; testfile.tar contains just a zipped
testfile, not a symlink, so tar is doing the right thing by just
extracting that file, I don't think it's expected to follow an existing
symlink and put the file in place of the one the link points to.

The -h parameter as I understand it, and when extracting, means to
follow symlinks *on the tar file*, not on the actual filesystem.

Could you clarify on where have you seen this behavior from tar? Also,
if possible, could you try with a more recent release of ubuntu, which
contains a newer version of tar? This is since Ubuntu 9.10 has reached
End of Life and is no longer supported.

I'll set this bug as incomplete pending your answer.

Thanks!


** Changed in: tar (Ubuntu)
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to tar in Ubuntu.
https://bugs.launchpad.net/bugs/522856

Title:
  -h option does not do what is expected

Status in “tar” package in Ubuntu:
  Incomplete

Bug description:
  Binary package hint: tar

  Executing tar -hxf <file.tar> should follow existing symlinks and
  write files to those destination paths. Instead, the behavior of tar
  -hxf <file.tar> and tar -xf <file.tar> is exactly the same -- it
  overwrites the symlink with the file.

  Example:
  $ echo "Testing" >testfile
  $ tar -cf test.tar testfile
  $ rm testfile
  $ ln -s testfile2 testfile

  This command should overwrite the symlink "testfile":
  $ tar -xf test.tar

  This command should create a new file named "testfile2", leaving the symlink "testfile" pointing at "testfile2":
  $ tar -hxf test.tar

  Instead, the latter command performs exactly as the former command
  does.

  ProblemType: Bug
  Architecture: amd64
  Date: Tue Feb 16 16:04:13 2010
  DistroRelease: Ubuntu 9.10
  Package: tar 1.22-1
  ProcEnviron:
   SHELL=/bin/bash
   PATH=(custom, user)
   LANG=en_US.UTF-8
   LANGUAGE=
  ProcVersionSignature: Ubuntu 2.6.31-19.56-server
  SourcePackage: tar
  Uname: Linux 2.6.31-19-server x86_64

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tar/+bug/522856/+subscriptions




More information about the foundations-bugs mailing list