[Bug 479474] New: patch -l malform files
https://bugzilla.novell.com/show_bug.cgi?id=479474 Summary: patch -l malform files Classification: openSUSE Product: openSUSE 11.2 Version: Factory Platform: All OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: Development AssignedTo: pth@novell.com ReportedBy: pmladek@novell.com QAContact: qa@suse.de Found By: Development Created an attachment (id=275300) --> (https://bugzilla.novell.com/attachment.cgi?id=275300) test files (patch-test.tar) I see this problem only in factory. I do not see this problem without the '-l' option. Step to reproduce: 1. tar -xf patch-test.tar # attached file 2. patch -p0 -l -b < change.diff Result: The file 'A' stay unchanged. The file 'B' is replaced by the file 'A' and the hunk for the file 'A' is applied to the new file 'B'. Expected results: The patch was applied correctly on openSUSE-11.1 and lower. Well, the diff is fuzzy, so another acceptable behavior would be to refuse to apply the diff or to apply the hunks on another place. In each case, it should not replace the file 'B' by the file 'A' ;-) Note: It causes OpenOffice_org-bootstrap build to fail in factory. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=479474 User sndirsch@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=479474#c1 --- Comment #1 from Stefan Dirsch <sndirsch@novell.com> 2009-02-25 06:02:12 MST --- # patch -p0 -l -b < change.diff patching file A Hunk #1 succeeded at 66 with fuzz 2 (offset -1 lines). misordered hunks! output would be garbled Skipping patch. patching file B Hunk #1 succeeded at 36 with fuzz 1 (offset -3 lines).
The file 'A' stay unchanged.
That's correct.
The file 'B' is replaced by the file 'A'
Not at all.
and the hunk for the file 'A' is applied to the new file 'B'.
No. The hunk for file B in change.diff is applied to B. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=479474 User sndirsch@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=479474#c2 Stefan Dirsch <sndirsch@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|pth@novell.com |agruen@novell.com --- Comment #2 from Stefan Dirsch <sndirsch@novell.com> 2009-02-25 06:03:21 MST --- Latest changes were from Andreas. Reassigning. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=479474 User agruen@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=479474#c3 Andreas Gruenbacher <agruen@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #3 from Andreas Gruenbacher <agruen@novell.com> 2009-02-25 06:32:51 MST --- The new version submitted yesterday (/work/src/done/STABLE/patch) has this fixed, along with a bunch of other changes. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=479474 User pmladek@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=479474#c4 --- Comment #4 from Petr Mladek <pmladek@novell.com> 2009-02-25 06:38:33 MST --- Regarding the comment #1. Did you really check the generated files? The tool "patch" write something and it does something else. By other words, the messages does not correspond with the real action. At least here. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=479474 User sndirsch@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=479474#c5 --- Comment #5 from Stefan Dirsch <sndirsch@novell.com> 2009-02-25 06:41:58 MST ---
Did you really check the generated files?
Sure I did. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com