Bug 1206020 - Tar SHOULD default to --delay-directory-restore rather than --no-delay-directory-restore
Summary: Tar SHOULD default to --delay-directory-restore rather than --no-delay-direct...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: tar
Version: 22
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Pavel Raiskup
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-26 07:00 UTC by ernie_07
Modified: 2015-03-26 10:46 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-26 10:46:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description ernie_07 2015-03-26 07:00:24 UTC
Description of problem:

Timestamps of embedded non-empty directories assume the times of tar extraction.


Version-Release number of selected component (if applicable):

Tar Version 1.28 in Fedora-22


How reproducible:


Steps to Reproduce:

tar -xpf archivefoo.tar.bz2

instead of

tar --delay-directory-restore -xpf archivefoo.tar.bz2

when archivefoo.tar.bz2 was created from a directory containing files and directories where the directories also contain files and directories.


Actual results:

In the first case only the timestamp of the top directory will be preserved while the rest will assume the time of extraction

Expected results:

Timestamps of embedded non-empty directories should be preserved and will be if the --delay-directory-store option is used to override the default.

Additional info:

Comment 1 ernie_07 2015-03-26 07:23:29 UTC
100% Reproducible

Comment 2 Pavel Raiskup 2015-03-26 10:46:25 UTC
Hi ernie, thanks for the report.

(In reply to ernie_07 from comment #0)
> Description of problem:
>
> Timestamps of embedded non-empty directories assume the times of tar
> extraction.
>
> Version-Release number of selected component (if applicable):
> 
> Tar Version 1.28 in Fedora-22
> 
> How reproducible:
> 
> Steps to Reproduce:
> 
> tar -xpf archivefoo.tar.bz2
> 
> instead of
> 
> tar --delay-directory-restore -xpf archivefoo.tar.bz2
> 
> when archivefoo.tar.bz2 was created from a directory containing files and
> directories where the directories also contain files and directories.

Note that '--delay-directory-restore' is quite expensive option which can not
be turned on by default.  To sum what it does:  It caches metadata about *all*
directories in the tarball until the end of extraction;  then it does the
metadata restore.  This can be space/time expensive for very big tarballs.
By default, only the metadata for directories that construct the path to
currently extracted file are delayed (and stored in memory temporarily).  This
is usually sufficient for most tarballs around - and it is pretty easy to
create such "cleaner" tarball.

See the official GNU tar documentation regarding --delay-directory-restore:
http://www.gnu.org/software/tar/manual/html_node/Directory-Modification-Times-and-Permissions.html
I assume your tarball matches the first example in tar documentation ^^, this
would mean this is WONTFIX/NOTABUG.  Please reopen if you feel I'm wrong,

Thanks, Pavel


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