Bug 248591

Summary: The i and u switches for cp do not work together
Product: [Fedora] Fedora Reporter: zeno
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 7CC: meyering
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 6.9-5.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-09 23:43:17 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:
Bug Depends On:    
Bug Blocks: 235704    

Description zeno 2007-07-17 16:55:34 UTC
Description of problem:
The i and u switches for the cp command do not work correctly.

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

How reproducible:
Able to reproduce at will.

Steps to Reproduce:
1. Create a file (file1).
2. Create another file (file2) with the same name in another directory.
3. Make sure file1 has an older file modified date than file2.
4. Use cp -iu to copy file to the directory in the same place as file2.
  
Actual results:
You will be prompted to overwrite file2.

Expected results:
You should not be prompted. The u switch indicates that the file should only be
copied if file1 is newer than file2.

Additional info:
It prompts you no matter what. And no matter what you pick at the prompt,
nothing will happen. It should not prompt, I have tested other flavors and they
do not prompt. (Note there was no cp Component, so I selected another)

Comment 1 Jim Meyering 2007-07-18 08:21:22 UTC
Thanks for the report.  It is indeed a bug, and it affects the very latest
version upstream, too.  I'll look into fixing it there and let you know the result.

Comment 2 Jim Meyering 2007-07-19 08:56:40 UTC
I've fixed this upstream.
    http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10969


Comment 3 Ondrej Vasik 2007-10-25 13:21:32 UTC
Built as coreutils-6.9-4.fc7 and pushed to testing. (coreutils-6.9-8.fc8 is for F8)

Comment 4 Fedora Update System 2007-11-09 23:43:16 UTC
coreutils-6.9-5.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.