RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 799252 - Tar --keep-old-files option does not work as expected.
Summary: Tar --keep-old-files option does not work as expected.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: tar
Version: 6.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Raiskup
QA Contact: Branislav Blaškovič
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-02 09:31 UTC by Pavel Raiskup
Modified: 2012-06-20 13:49 UTC (History)
4 users (show)

Fixed In Version: tar-1.23-6.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 13:49:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0849 0 normal SHIPPED_LIVE tar bug fix and enhancement update 2012-06-19 20:48:42 UTC

Description Pavel Raiskup 2012-03-02 09:31:01 UTC
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
possible.

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:

    tar-1.23.el6

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:
http://git.savannah.gnu.org/cgit/tar.git/commit/?id=7a5a3708cb8b33494cd6ac64bfe163f631a33edf

Comment 8 errata-xmlrpc 2012-06-20 13:49:38 UTC
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.

http://rhn.redhat.com/errata/RHBA-2012-0849.html


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