[Bug 228069] tar(1) fails to append newer files only (-u, --update), but always appends all files (like -r).

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 17 Sep 2024 16:38:32 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228069

--- Comment #4 from titus m <titus@edc.ro> ---
There is another problem.
If tar needs to strip the first / in the file path it seems it wont detect that
the file is already present in the archive
#####################################################################
[19:33:12] [ns!titus]~ $tar  -cvf a.tar --format=pax /etc/passwd  /etc/hosts
/etc/motd
tar: Removing leading '/' from member names
a etc/passwd
a etc/hosts
a etc/motd
[19:33:29] [ns!titus]~ $tar  -uvf a.tar  /etc/passwd  /etc/hosts /etc/motd
tar: Removing leading '/' from member names
a etc/passwd
a etc/hosts
a etc/motd
########## now trying from / so it wont have to remove first / #####
[19:33:48] [ns!titus]~ $tar  -uvf a.tar  -C / etc/passwd  etc/hosts etc/motd
[19:33:59] [ns!titus]~ $tar  -uvf a.tar  -C / etc/passwd  etc/hosts etc/motd
##########################################################################
[19:34:00] [ns!titus]~ $tar tf a.tar
etc/passwd
etc/hosts
etc/motd
etc/passwd
etc/hosts
etc/motd

-- 
You are receiving this mail because:
You are the assignee for the bug.