Created attachment 439655 [details] patch with files to patch Description of problem: (01:00:42 PM) jpopelka: I have a patch that patches 2 files. When I apply it (01:00:42 PM) jpopelka: patch -p1 --verbose --fuzz=0 <foomatic-db-device-ids-20100506.patch (01:01:05 PM) jpopelka: it creates backup for one of the files with .orig suffix (01:01:37 PM) twaugh: Only one? (01:01:40 PM) jpopelka: only one (01:01:41 PM) twaugh: What does 'lsdiff' say about the patch? (01:02:07 PM) jpopelka: >lsdiff foomatic-db-device-ids-20100506.patch (01:02:07 PM) jpopelka: foomatic-db-20100204/db/source/PPD/Ricoh/PS/Ricoh-Aficio_SP_C420DN_PS.ppd (01:02:07 PM) jpopelka: foomatic-db-20100204/db/source/printer/HP-Color_LaserJet_2605dn.xml (01:02:24 PM) jpopelka: it creates db/source/PPD/Ricoh/PS/Ricoh-Aficio_SP_C420DN_PS.ppd.orig (01:03:15 PM) twaugh: There used to be a bug where if the same file was patched twice from the same input file, the .orig file would get overwritten the second time (01:03:20 PM) twaugh: I wonder if the fix for that didn't work right Version-Release number of selected component (if applicable): patch-2.6.1-1.fc13.x86_64 How reproducible: Always Steps to Reproduce: 1. unpack the attached file (foomatic-db-20100819.tar.bz2) 2. cd foomatic-db-20100819 3. patch -p1 --verbose --fuzz=0 <foomatic-db-device-ids-20100506.patch Actual results: Backup file db/source/PPD/Ricoh/PS/Ricoh-Aficio_SP_C420DN_PS.ppd.orig is created. Expected results: No backup file created.
Looks like intentional behaviour. One of the patches required an offset of 1 line, whereas the other applied exactly. --backup-if-mismatch Back up a file if the patch does not match the file exactly and if backups are not otherwise requested. This is the default unless patch is conforming to POSIX.