Hello, tar (it seems that at least version from 1.23 to 1.26) fails to sync the archive contents against archived directory with the '--update' option when changing directory (the -C option) is active.
Original report by Nicolas Mitsis:
https://bugzilla.redhat.com/688567
Steps to reproduce (or see the attached test-case):
# prepare directory
mkdir /tmp/dir
touch /tmp/dir/a
# create archive
tar -C /tmp -cf /tmp/archive.tar dir
# add something to filesystem
mkdir /tmp/dir/b
touch /tmp/dir/b/c
# try to update archive to synchronize with '/tmp/dir'
tar -C /tmp -uf /tmp/archive.tar dir
--> tar output this: <--
tar: dir/b: Cannot stat: No such file or directory
tar: dir/a: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
It looks like the only problem was that target children of given
directory 'dir' (these files are expanded on update.c:160) were not
inheriting the 'name->change_dir' info from its parent. Could you please
consider proposed fix in attachement? Separate test-case is also
attached.
Pavel
0001-tar-new-test-for-update-option-update03.at.patch
Description: Binary data
bindFPJbMByzv.bin
Description: Binary data
