Hi!

When creating --listed-incremental archives and --concatenate them tar will
exit with error while unpacking if concatenated archive contains removed
directory.

Tested both on 1.27.1 and 1.28.

$ mkdir /tmp/tar-bug
$ cd /tmp/tar-bug
$ mkdir -p data/dir
$ tar cvf full.tar -g snap -C data .
tar: .: Directory is new
tar: ./dir: Directory is new
./
./dir/
$ rmdir data/dir 
$ tar cvf incr.tar -g snap -C data .
./
$ cp full.tar full2.tar 
$ tar -A incr.tar -f full2.tar -g /dev/null 
$ tar xvpf full2.tar -g /dev/null -C data/
./
./dir/
./
tar: Deleting './dir'
tar: ./dir: Cannot stat: No such file or directory
tar: ./dir: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
$ echo $?
2

At same time original (non-concatenated) archives works just fine:

$ tar xvpf full.tar -g /dev/null -C data/
./
./dir/
$ tar xvpf incr.tar -g /dev/null -C data/
./
tar: Deleting './dir'
$ echo $?
0


P.S. I'm off the list, so please reply to my email if there is workaround
or patch available - this bug breaks our automated restore from backups
because of these false-positive errors. Or comment on
https://bugs.gentoo.org/show_bug.cgi?id=546294

-- 
                        WBR, Alex.

Reply via email to