Bring back placeholders

They can still be useful if -h is used.  See Pavel Cahyna in:
https://lists.gnu.org/r/bug-tar/2025-11/msg00026.html
while we’re at it bring them back if -P is used,
as they can still be useful there too.
* src/extract.c (HAVE_BIRTHTIME, BIRTHTIME_EQ):
Bring back these macros.
(struct delayed_link, struct string_list):
Bring back these structs.
(delayed_link_table, delayed_link_head, delayed_link_tail):
Bring back these static vars.
(dl_hash, dl_compare, find_direct_ancestor)
(find_delayed_link_source, create_placeholder_file)
(apply_delayed_link, apply_delayed_links):
Bring back these static functions.
(mark_metadata_set): Rename from mark_after_links.  All uses changed.
(extract_link, extract_symlink):
Create placeholders as before, except only if -P or -h are used.
(extract_finish): Deal with delayed links, as before.
This commit is contained in:
Paul Eggert
2025-11-26 20:49:38 -08:00
parent 2bbc58bf0b
commit f83a120c58
3 changed files with 447 additions and 63 deletions
+5 -4
View File
@@ -1,4 +1,4 @@
GNU tar NEWS - User visible changes. 2025-11-13
GNU tar NEWS - User visible changes. 2025-11-26
Please send GNU tar bug reports to <bug-tar@gnu.org>
version 1.35.90 (git)
@@ -62,10 +62,11 @@ option.
** Sparse files are now read and written with larger blocksizes.
** When extracting, tar no longer creates empty placeholder files
** When extracting and neither --absolute-names (-P) nor --dereference
(-h) is used, tar no longer creates empty placeholder files
that are later replaced by symbolic links. The placeholders are no
longer needed now that tar no longer follows symbolic links to
targets outside the working directory.
longer needed now that tar by default no longer follows symbolic
links to targets outside the working directory.
version 1.35 - Sergey Poznyakoff, 2023-07-18