#991275 tar doesn't restore all directory timestamps from the extracted archive

Package:
tar
Source:
tar
Description:
GNU version of the tar archiving utility
Submitter:
Vincent Lefevre
Date:
2021-07-22 13:24:03 UTC
Severity:
wishlist
Tags:
#991275#5
Date:
2021-07-19 13:59:17 UTC
From:
To:
tar doesn't restore all directory timestamps from the extracted archive.

Example with

  tar -xaf /usr/src/linux-source-5.10.tar.xz

There are 4712 directories, but 118 of them have a recent timestamp.

zira% find linux-source-5.10 -type d | wc -l
4712
zira% find linux-source-5.10 -mtime -1 | wc -l
118
zira% find linux-source-5.10 -mtime -1 -type d | wc -l
118

e.g.

zira% ls -ld linux-source-5.10/drivers/dma/dw
drwxr-xr-x 2 vinc17 vinc17 4096 2021-07-19 15:45:29 linux-source-5.10/drivers/dma/dw

(though this directory is present in the archive).

#991275#10
Date:
2021-07-19 14:11:11 UTC
From:
To:
machine (they are both Debian/unstable machines).
#991275#15
Date:
2021-07-19 15:08:27 UTC
From:
To:
I can see that the --delay-directory-restore option solves the issue.
But IMHO, this option should be the default to avoid surprising
results (the linux package doesn't ensure that the items are
"correctly" ordered, if I understand its debian/rules.real file).

#991275#20
Date:
2021-07-19 19:16:57 UTC
From:
To:
severity 991275 wishlist
tags 991275 + wontfix
thanks

Hi Vincent,

I am going to forward this report upstream, but I find it extremely
unlikely they'd change this behavior as that would lead to
surprising results for others depending on the current default.

Regards,

#991275#29
Date:
2021-07-19 20:32:02 UTC
From:
To:
Why would user want the current default?

This rule is very obscure and unintuitive, and I don't see any
advantage.

The linux-source archive surely does not expect this rule.

#991275#34
Date:
2021-07-22 13:20:08 UTC
From:
To:
I've reported the bug upstream.