Bug 66047
Summary: | tar --delete corrupts archive when given no or missing targets | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Need Real Name <spn> |
Component: | tar | Assignee: | wdovlrrw <brosenkr> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Ben Levenson <benl> |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2002-06-04 22:11:22 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Need Real Name
2002-06-04 22:11:16 UTC
Works with tar from 7.3. It does not work with the 7.3 machine to which I have access: spn@n[105]: rpm -q tar tar-1.13.25-4 spn@n[106]: tar cf t.tar passwd hosts spn@n[107]: tar f t.tar --list passwd hosts spn@n[108]: tar f t.tar --delete junk tar: junk: Not found in archive tar: Error exit delayed from previous errors spn@n[109]: tar ft t.tar spn@n[110]: tar f t.tar --list spn@n[111]: file t.tar t.tar: data OR: spn@n[112]: tar cf t.tar passwd hosts spn@n[113]: tar tf t.tar passwd hosts spn@n[114]: tar f t.tar --delete hosts spn@n[115]: tar tf t.tar passwd spn@n[116]: tar f t.tar --delete spn@n[117]: tar tf t.tar Note: according to a (slightly old) man/info page at gnu.org "if you list no member names, nothing will be deleted." However, the regression tests in tar-1.13.19-4 are not very sophisticated and they don't check for these conditions. Suggest re-opening or reporting somewhere. The problem depends (apparently) on the size of the members. It's clearly a bug in tar, and I've submitted a bug report to bug-tar In the tests directory of the unpatched 7.1 source for tar, .../tar-1.13.19/tests, I performed the following (similar to what "make check" performs): # ./genfile -l 50000 > file1 # ./genfile -l 1024 > file2 # ../src/tar cf archive file1 file2 # ../src/tar f archive --delete # ../src/tar tf archive file1 file2 # ./genfile -l 25000 > file1 # ./genfile -l 1024 > file2 # ../src/tar cf archive file1 file2 # ../src/tar f archive --delete # ../src/tar tf archive file1 # ./genfile -l 1024 > file1 # ./genfile -l 1024 > file2 # ../src/tar cf archive file1 file2 # ../src/tar f archive --delete # ../src/tar tf archive # well, according to Paul Eggert, the current maintainer of GNU tar, there are several unfixed bugs in delete. it's unfortunate that the man page, info page, and all the source documentation neglect to mention this. FYI (i meant to include this in the previous post) the same problems exist in the tar-1.13.25 distribution (on which is based the version of tar in 7.3). |