Bug 104766

Summary: --newer incorrect for same time
Product: [Retired] Red Hat Linux Reporter: arch harris <service>
Component: tarAssignee: Peter Vrabec <pvrabec>
Status: CLOSED UPSTREAM QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-27 10:53:59 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 arch harris 2003-09-20 18:53:54 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
The newer option should have files appended/extracted only if
the file is NEWER.  However it incorrectly appends/extracts if the
file has the same time.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.cd /tmp; touch file
2.tar -cvf tst.tar file
3.tar -xvf tst.tar --newer /tmp/file file
    

Actual Results:  File is extracted.

Expected Results:  File should not be extracted, it is not newer than /tmp/file.

Additional info:

Comment 1 Peter Vrabec 2004-10-27 10:51:10 UTC
This bug is already fixed in new version of tar from upstream.
I suggest:
- upgrade tar from upstream
- get new FC3(available soon)

$ >file1
$ >file2
$ tar cvf test.tar file1 file2
file1
file2
$ tar tvf test.tar --newer ./file1
-rw-rw-r-- peter/peter       0 2004-10-27 12:35:29 file2
$ tar tvf test.tar --newer ./file2
$ tar --version
tar (GNU tar) 1.14