bin/138858: patch(1) assumes that a file appears only once in the
patch in check-only mode
deeptech71 at gmail.com
deeptech71 at gmail.com
Tue Sep 15 20:40:04 UTC 2009
>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 at 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:
More information about the freebsd-bugs
mailing list