From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 Description of problem: issuing 'tar -f archive.tar --delete somefilename' removes files at the end of the archive if the archive contains zero length files or symbolic links and "somefilename" is not contained in the archive Version-Release number of selected component (if applicable): tar-1.13.25-4.7.1 How reproducible: Always Steps to Reproduce: 1. create a sample archive dd if=/dev/zero of=file1 bs=1024 count=9 2>/dev/null echo file2_contents >file2 # Create empty file - that's the key. if no size 0 files (or symbolic links) # are in the archive, everything works as expected # alternatively we could use 'ln -s file2 file3' here touch file3 # Make sure the size 0 file is not at the end of the archive dd if=/dev/zero of=file4 bs=1024 count=1 2>/dev/null tar cf test.tar file1 file2 file3 file4 2. save the file listing tar tf test.tar > before 3. try to delete a file that doesn't exist in the archive (this corrupts the archive) tar --delete -f test.tar file_does_not_exist 4. save the file listing after corruption tar tf test.tar > after 5. show the differences diff before after Actual Results: file "before" and "after" differ Expected Results: file "before" and "after" should be identical Additional info: Bug can also be reproduced on 7.2 and phoebe
Created attachment 89150 [details] Script to reproduce the bug
*** Bug 84919 has been marked as a duplicate of this bug. ***
applies to Fedora Core release 1 (Yarrow) as well (tar-1.13.25-12)