Tar fails to --exclude files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU tar |
Fix Released
|
Unknown
|
|||
tar (Debian) |
Fix Released
|
Unknown
|
|||
tar (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
Hi,
this is a regression in tar 1.28-2.1 -> 1.29-1 and by that it is valid for Xenial -> Yakkety, but as well for Debian Stretch.
Fortunately there is at least a simple test:
rm -rf dir; mkdir -p dir/subdir; touch dir/subdir/file; tar -c -f /tmp/test.tar -C dir subdir --exclude subdir/file; tar -tf /tmp/test.tar subdir/file
Correct:
tar: subdir/file: Not found in archive
tar: Exiting with failure status due to previous errors
Wrong:
subdir/file
This could cause quite a few weird/under-
I'll report to Debian as well and link the bug.
ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: tar 1.29-1
ProcVersionSign
Uname: Linux 4.4.0-23-generic x86_64
ApportVersion: 2.20.1-0ubuntu4
Architecture: amd64
Date: Fri Jun 3 09:46:54 2016
InstallationDate: Installed on 2016-06-01 (1 days ago)
InstallationMedia: Ubuntu-Server 16.10 "Yakkety Yak" - Alpha amd64 (20160601)
SourcePackage: tar
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in tar (Debian): | |
status: | Unknown → New |
Changed in tar (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in tar: | |
status: | Unknown → Fix Released |
Changed in tar (Debian): | |
status: | New → Fix Released |
See related discussions: lists.gnu. org/archive/ html/bug- tar/2016- 05/msg00012. html lists.gnu. org/archive/ html/bug- tar/2016- 06/msg00014. html
http://
http://
TL;DR:
In reference to my testcase:
BAD:
tar -c -f /tmp/test.tar -C dir subdir --exclude subdir/file
FIXED:
tar -c -f /tmp/test.tar -C dir --exclude subdir/file subdir
Clarifying last bits with upstream, but this probably is a regression for everybody who used it wrong (like me) in the past.