This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 799252 - Tar --keep-old-files option does not work as expected.
Tar --keep-old-files option does not work as expected.
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: tar (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Pavel Raiskup
Branislav Blaškovič
Depends On:
  Show dependency treegraph
Reported: 2012-03-02 04:31 EST by Pavel Raiskup
Modified: 2012-06-20 09:49 EDT (History)
4 users (show)

See Also:
Fixed In Version: tar-1.23-6.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-20 09:49:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Pavel Raiskup 2012-03-02 04:31:01 EST
Subject:  Tar --keep-old-files option does not work as expected.

Description of problem:

Tar traditional functionality of --keep-old-files option was (when extracting
archive contents) fail when extracted files already existed in file system
(actually return error code 2) even if is extracted everything that is

Tar is actually not returning error code when this problem occurs, it just
silently skips these files and continues with unpacking (returning zero).

This regression was pushed by 8f390db9 upstream commit and as a solution in
upstream for this problem was introduced new option "--skip-old-files", which
silently skips already existing files and "--keep-old-files" was switched back
to traditional behaviour (btw. the same like in RHEL-5) to failing when
extracted files already existed.

Version-Release number:


Steps to Reproduce:

    1. go to clean directory
    2. tar -xf /some/archive.tar
    3. tar --keep-old-files -xf /some/archive.tar

Actual results:

    tar successes with zero return value without any warnings

Expeected results:

    tar should return error value 2 and tell something

Additional info:
Upstream commit:
Comment 8 errata-xmlrpc 2012-06-20 09:49:38 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

Note You need to log in before you can comment on or make changes to this bug.