Bug 42666

Summary: gendiff bug
Product: [Retired] Red Hat Linux Reporter: Tim Waugh <twaugh>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-05-29 09:51:52 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 Tim Waugh 2001-05-29 09:51:48 UTC
When patch creates a backup of a file that doesn't exist, it makes it 
unreadable (this is documented behaviour).

Gendiff ought to check that $f is readable first, like:

if [ -r "$f" ]
then
  diff ${U} /dev/null "${f%$2}"
else
  diff ${U} "${f}" "${f$2}"
fi

(Mandrake's approach is to change patch's behaviour, but I think that 
really gendiff should be fixed instead.)

Comment 1 Jeff Johnson 2002-07-13 19:58:15 UTC
Fixed (finally) in CVS, should be in rpm-4.1-0.48