Date: Tue, 15 Sep 2009 20:35:27 GMT From: "deeptech71@gmail.com" <deeptech71@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/138858: patch(1) assumes that a file appears only once in the patch in check-only mode Message-ID: <200909152035.n8FKZRie015788@www.freebsd.org> Resent-Message-ID: <200909152040.n8FKe3do038927@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 138858 >Category: bin >Synopsis: patch(1) assumes that a file appears only once in the patch in check-only mode >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 15 20:40:03 UTC 2009 >Closed-Date: >Last-Modified: >Originator: deeptech71@gmail.com >Release: ~CURRENT >Organization: >Environment: FreeBSD x 8.0-BETA2 FreeBSD 8.0-BETA2 #0 r196195M: Fri Aug 14 02:25:06 UTC 2009 devhc@:/usr/obj/usr/src/sys/HQ i386 >Description: There are patches that should be applied in a strict order to be successful (ie., on a set of files, apply patch#1 first, then apply patch#2 on the result yielded by applying patch#1). I concatenate the patches (in correct order), and pipe them to patch(1). But, as always, I check what would happen if the patches were applied (use the -C option). The test run can show wrong results if the concatenated patch references a file multiple times near a common line, probably because in the check-only mode, patch(1) tries to apply each hunk on the original, unmodified files. >How-To-Repeat: diff -u orig mod1 > mod1.patch # mod1 changes line N of orig diff -u orig mod2 > mod2.patch # mod2 changes line N of orig, too ! cat mod1.patch mod2.patch | patch -Cs # looks OK cat mod1.patch mod2.patch | patch -s # fail ! >Fix: (If this won't be fixed soon, it would be nice to have this documented in the manpages.) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909152035.n8FKZRie015788>