touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #121620
[Bug 1357345] Re: tar: untaring with --recursive-unlink ends with an empty directory
In case someone is interested in this bug, what I remember I noticed
later, is that `tar` extract a directory, then delete it, then try to
add files in the just deleted directory (which turns to be wrong,
obviously), then sometime recreate the directory, which ends to be
empty.
Someone should care, as `tar` is a core functionality.
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to tar in Ubuntu.
https://bugs.launchpad.net/bugs/1357345
Title:
tar: untaring with --recursive-unlink ends with an empty directory
Status in tar package in Ubuntu:
New
Bug description:
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tar/+bug/1357345/+subscriptions
References