Bug 154122

Summary: /bin/cp option "--preserve": wrong documentation and misbehaviour
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Wolfgang Schludi <schludi>
Component: BasesystemAssignee: Andreas Schwab <schwab>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: schludi
Version: Final   
Target Milestone: SUSE Linux 10.1   
Hardware: i386   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Wolfgang Schludi 2006-02-28 15:19:10 UTC
installed packages:
===================
- coreutils-5.3.0-20.2
- kernel-bigsmp-2.6.13-15.8
- kernel-bigsmp-nongpl-2.6.13-15.8

reproduce (as root):
==========
# cp --force --parents --preserve=all /boot/vmlinuz /tmp; echo $?
cp: cannot lgetfilecon `/boot/vmlinuz': No data available
1
# cp --force --parents --preserve=mode,ownership,timestamps,links /boot/vmlinuz /tmp; echo $?
0
# selinuxenabled;echo $?
1

bug-description:
================
- info/man states that "--preserve=all" is the same as "--preserve=mode,ownership,timestamps,links". The above example shows the opposite. 
- the first command shouldn't fail as root(this is what we did in our backup script)
- coreutils 5.3.0 don't seem to be a official release. At least at http://ftp.gnu.org/pub/gnu/coreutils/ there is no such version. Why do you distribute unofficial versions?

regards,
 schludi
Comment 1 Andreas Schwab 2006-02-28 17:43:06 UTC
Fixed.