Public bug reported:

Using tar version 1.26-4ubuntu1 from Ubuntu 12.04 (I'm submitting this
case here, as I can't tell if it's specific to the tar shipped with
Ubuntu or a bug with all tar, and this concerns Ubuntu base packages
anyway).

Using the attached archive file, running this:

/bin/tar --extract --auto-compress --exclude-backups --exclude-caches
--exclude-vcs --preserve-permissions --recursive-unlink --totals
--unlink-first --verbose --file Sphinx.tar.xz; ls Sphinx

… I get an empty directory, although the output says it extracted many
things.

This seems to be related to a buggy `--recursive-unlink` option, as this
one works:

/bin/tar --extract --auto-compress --exclude-backups --exclude-caches
--exclude-vcs --preserve-permissions --totals --unlink-first --verbose
--file Sphinx.tar.xz; ls Sphinx

… the directory is not empty any‑more.

I get this unexpected behaviour with this archive only, not with others.

My guess is that it's due to the order in which the entries appears in
the tar file. Indeed, the Sphinx top level directory is listed last, and
its content before it, so tar extract its content then delete all the
directory to recreate the directory, emptied.

I can't believe this is the expected behaviour.

** Affects: tar (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "The archive exposing the bug"
   
https://bugs.launchpad.net/bugs/1357345/+attachment/4178372/+files/Sphinx.tar.xz

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

Title:
  tar: untaring with --recursive-unlink ends with an empty directory

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to