Discussion:
diff, patch, and symbolic links
Eric.Oosterhof
2002-04-24 18:07:00 UTC
Permalink
I have a customized kernel tree, and am trying to create the appropriate
patch file. I use diff -ruN, and then subsequently use patch -p0 to apply
the patch. When I apply the patch, the files that I have changed in the
include/asm-ppc directory cause conflicts with the include/asm symbolic
links to the same files. I think that I can resolve this by editing the
patch file to remove any reference to changes in the include/asm tree, but
the exclude file that I created that listed all the include/asm files
should have worked. At any rate, I am looking for the "right" solution.

Eric Oosterhof


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Ruhland, Paul
2002-04-24 18:18:07 UTC
Permalink
Eric,

I always do a 'make mrproper' and then an 'rm -f .config*' ( from the root
of the linux tree of course ) before generating any patch files. Just be
sure to save your '.config' somewhere before you remove it.

This way all generated files including the 'include/asm' symlink are
removed.

--
Paul Ruhland


-----Original Message-----
From: Eric.Oosterhof at radisys.com [mailto:Eric.Oosterhof at radisys.com]
Sent: Wednesday, April 24, 2002 2:07 PM
To: linuxppc-dev at lists.linuxppc.org
Subject: diff, patch, and symbolic links



I have a customized kernel tree, and am trying to create the appropriate
patch file. I use diff -ruN, and then subsequently use patch -p0 to apply
the patch. When I apply the patch, the files that I have changed in the
include/asm-ppc directory cause conflicts with the include/asm symbolic
links to the same files. I think that I can resolve this by editing the
patch file to remove any reference to changes in the include/asm tree, but
the exclude file that I created that listed all the include/asm files should
have worked. At any rate, I am looking for the "right" solution.

Eric Oosterhof


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Eric.Oosterhof
2002-04-24 18:34:01 UTC
Permalink
Post by Ruhland, Paul
Eric,
I always do a 'make mrproper' and then an 'rm -f .config*' ( from the root
of the linux tree of course ) before generating any patch files. Just be
sure to save your '.config' somewhere before you remove it.
This way all generated files including the 'include/asm' symlink are
removed.
--
Paul Ruhland
I did a 'make mrproper' prior, and I still have the symlink. I also
deleted it by hand, but that didn't help. In fact, I even have that
symlink in the original tree. Is that the root of all evil? Lastly, when
I deleted the .config, and then do the diff and patch, patch complains that
it wants to erase the .config in the ORIGINAL tree, which is totally wrong!
I absolutely can't have the patch trying to affect the original tree - why
does that even begin to occur?


Eric Oosterhof


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Geert Uytterhoeven
2002-04-24 18:56:36 UTC
Permalink
Post by Eric.Oosterhof
I have a customized kernel tree, and am trying to create the appropriate
patch file. I use diff -ruN, and then subsequently use patch -p0 to apply
the patch. When I apply the patch, the files that I have changed in the
include/asm-ppc directory cause conflicts with the include/asm symbolic
links to the same files. I think that I can resolve this by editing the
patch file to remove any reference to changes in the include/asm tree, but
the exclude file that I created that listed all the include/asm files
^^^^^^^^^^^^^^^^^^^^^^^^^
Post by Eric.Oosterhof
should have worked. At any rate, I am looking for the "right" solution.
AFAIK you cannot exclude files using their full path names. Just using `asm'
works, though.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Michel Lanners
2002-04-24 19:25:01 UTC
Permalink
Post by Eric.Oosterhof
Post by Ruhland, Paul
I always do a 'make mrproper' and then an 'rm -f .config*' ( from the root
of the linux tree of course ) before generating any patch files. Just be
sure to save your '.config' somewhere before you remove it.
This way all generated files including the 'include/asm' symlink are
removed.
I did a 'make mrproper' prior, and I still have the symlink. I also
deleted it by hand, but that didn't help. In fact, I even have that
symlink in the original tree. Is that the root of all evil? Lastly, when
I deleted the .config, and then do the diff and patch, patch complains that
it wants to erase the .config in the ORIGINAL tree, which is totally wrong!
I absolutely can't have the patch trying to affect the original tree - why
does that even begin to occur?
Because your 'original' tree has the symlink also. Do a 'make mrproper'
in _both_ trees. That has always worked for me....

At any rate, there's no reason to have build files (symlinks, .config's
et al) in your 'original' tree.

Cheers

Michel

-------------------------------------------------------------------------
Michel Lanners | " Read Philosophy. Study Art.
23, Rue Paul Henkes | Ask Questions. Make Mistakes.
L-1710 Luxembourg |
email mlan at cpu.lu |
http://www.cpu.lu/~mlan | Learn Always. "


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Continue reading on narkive:
Loading...