On 9/11/18 6:35 AM, Jean Delvare wrote: > Hi Randy, Andreas, > > On Mon, 2018-09-10 at 23:44 +0200, Andreas Grünbacher wrote: >> Am Mo., 10. Sep. 2018 um 22:43 Uhr schrieb Randy Dunlap >> <[email protected]>: >>> >>> Hi, >>> >>> [quilt version 0.65] >>> >>> Summary: one file in a patch (lib/Makefile) is not part of the updated patch >>> >>> >>> I'm trying to apply patch 4 (only; the rest aren't needed just to build >>> lib/generic-radix-tree.c): >>> https://lore.kernel.org/lkml/[email protected]/ >>> >>> include/linux/generic-radix-tree.h | 222 +++++++++++++++++++++++++++++ >>> lib/Makefile | 3 +- >>> lib/generic-radix-tree.c | 180 +++++++++++++++++++++++ >>> 3 files changed, 404 insertions(+), 1 deletion(-) >>> >>> >>> I'm applying the patch to linux-next-20180910. >>> lib/Makefile does not apply cleanly: >>> >>> rdunlap@midway:linux-next-20180910> quilt push >>> Applying patch generic-radix-trees.patch >>> patching file include/linux/generic-radix-tree.h >>> patching file lib/Makefile >>> Hunk #1 FAILED at 38. >>> 1 out of 1 hunk FAILED -- rejects in file lib/Makefile >>> patching file lib/generic-radix-tree.c >>> Patch generic-radix-trees.patch does not apply (enforce with -f) >>> rdunlap@midway:linux-next-20180910> quilt push -f >>> Applying patch generic-radix-trees.patch >>> patching file include/linux/generic-radix-tree.h >>> patching file lib/Makefile >>> Hunk #1 FAILED at 38. >>> 1 out of 1 hunk FAILED -- saving rejects to file lib/Makefile.rej >>> patching file lib/generic-radix-tree.c >>> Applied patch generic-radix-trees.patch (forced; needs refresh) >>> >>> rdunlap@midway:linux-next-20180910> quilt files | more >>> include/linux/generic-radix-tree.h >>> lib/generic-radix-tree.c >>> >>> <fix lib/Makefile hunk failure> >>> >>> rdunlap@midway:linux-next-20180910> quilt ref >>> Refreshed patch generic-radix-trees.patch >>> rdunlap@midway:linux-next-20180910> quilt files | more >>> include/linux/generic-radix-tree.h >>> lib/generic-radix-tree.c >>> >>> >>> lib/Makefile is not part of the patch, although diff does see that >>> generic-radix-tree.o has been added to it: >>> >>> rdunlap@midway:lib> diff -u Makefile.orig Makefile >>> --- Makefile.orig 2018-08-12 13:41:04.000000000 -0700 >>> +++ Makefile 2018-09-10 13:34:23.844918294 -0700 >>> @@ -37,8 +37,9 @@ >>> bust_spinlocks.o kasprintf.o bitmap.o scatterlist.o \ >>> gcd.o lcm.o list_sort.o uuid.o flex_array.o iov_iter.o clz_ctz.o \ >>> bsearch.o find_bit.o llist.o memweight.o kfifo.o \ >>> - percpu-refcount.o percpu_ida.o rhashtable.o reciprocal_div.o \ >>> - once.o refcount.o usercopy.o errseq.o bucket_locks.o >>> + percpu-refcount.o rhashtable.o reciprocal_div.o \ >>> + once.o refcount.o usercopy.o errseq.o bucket_locks.o \ >>> + generic-radix-tree.o >>> >>> >>> What happened? Help? > > I can reproduce the bug, after adding the following to my ~/.quiltrc: > > QUILT_PATCH_OPTS="-F 0" > > Randy, I suppose you have this option in your ~/.quiltrc too?
Hi Jean, I have QUILT_PATCH_OPTS="-u -b -V numbered" (but I don't know why :) >> Hmm, "quilt push -f" applies the patch with something like: >> >> patch --unified -p1 --backup >> --prefix=.pc/PATCH-4-6-Generic-radix-trees.txt/ -f -i >> patches/PATCH-4-6-Generic-radix-trees.txt > > That's the patch command indeed, with "-F 0" in addition. > >> This should leave a backup file of lib/Makefile in >> .pc/PATCH-4-6-Generic-radix-trees.txt/lib/Makefile, but apparently it >> doesn't, > > It does. > > $ cat lib/Makefile.rej > --- lib/Makefile > +++ lib/Makefile > @@ -38,7 +38,8 @@ obj-y += bcd.o div64.o sort.o parser.o debug_locks.o > random32.o \ > gcd.o lcm.o list_sort.o uuid.o flex_array.o iov_iter.o clz_ctz.o \ > bsearch.o find_bit.o llist.o memweight.o kfifo.o \ > percpu-refcount.o percpu_ida.o rhashtable.o reciprocal_div.o \ > - once.o refcount.o usercopy.o errseq.o bucket_locks.o > + once.o refcount.o usercopy.o errseq.o bucket_locks.o \ > + generic-radix-tree.o > obj-$(CONFIG_STRING_SELFTEST) += test_string.o > obj-y += string_helpers.o > obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o > > I think the actual problem is that the backup file .pc/PATCH-4-6- > Generic-radix-trees.txt/lib/Makefile is not created. > >> and so quilt thinks lib/Makefile is not part of the patch. >> This should probably be fixed in patch. > > I think it already is. I can reproduce the bug with patch 2.7.5, but no > longer with patch 2.7.6.13-f322. > > I also can't reproduce the bug if I comment out the "diff --git" lines > in the patch file so that GNU patch no longer treats the patch as a > git-style patch. So maybe: > > commit 66fdcf0e7c83a1e2eb4db97b9e24f224db656b65 > Author: Andreas Gruenbacher > Date: Tue Jul 19 22:40:40 2016 +0200 > > Fix broken git-style patch behavior > > is the GNU patch commit which fixed it. Randy, you may want to backport > that git commit to your patch command, or upgrade to patch v2.7.6, and > see if it solves the problem for you. > where is this git tree, please? thanks for your help. -- ~Randy _______________________________________________ Quilt-dev mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/quilt-dev
