Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 546294 - app-arch/tar: -A/catenate/concatenate with -g/listed-incremental: stat no such file or directory
Summary: app-arch/tar: -A/catenate/concatenate with -g/listed-incremental: stat no suc...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://lists.gnu.org/archive/html/bu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-11 22:34 UTC by Alex Efros
Modified: 2015-04-20 16:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to fix this issue provided in tar maillist (remove_delayed_set_stat-1.diff,2.21 KB, patch)
2015-04-16 06:54 UTC, Alex Efros
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Efros 2015-04-11 22:34:58 UTC
When creating --listed-incremental archives and --concatenate them tar will exit with error while unpacking if concatenated archive contains removed directory.

Tested both on stable 1.27.1-r2 and latest ~ARCH 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
Comment 1 Alex Efros 2015-04-16 06:54:21 UTC
Created attachment 401306 [details, diff]
patch to fix this issue provided in tar maillist

Patch tested with 1.27.1-r2 and 1.28.
Comment 2 SpanKY gentoo-dev 2015-04-19 16:50:06 UTC
(In reply to Alex Efros from comment #1)

please provide a link to the upstream list where you got this patch
Comment 4 SpanKY gentoo-dev 2015-04-20 16:50:51 UTC
should be all set now in the tree; thanks for the report!

Commit message: Add fix from upstream for -A/-g flags
http://sources.gentoo.org/app-arch/tar/files/tar-1.28-concat-listed.patch?rev=1.1
http://sources.gentoo.org/app-arch/tar/tar-1.28-r1.ebuild?rev=1.1