• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

diff files

How can I 'install' a diff file with a lot of patches inside.
Say, redhat.diff
I keep getting rejected
0
bod_1
Asked:
bod_1
  • 3
1 Solution
 
terrycjCommented:
> I keep getting rejected.

i guess this means you are using patch?

try the -p# argument to patch, where # is the number
of leading slashes to ignore in filenames in the diff
file. it's important.

e.g., if you're sitting in a directory with a file
called prog.c but your diff file was made by someone
with the command diff /usr/src/prog.c /usr/src/prog.c.orig,
then the diff file is going to mention /usr/src/prog.c
instead of simply prog.c. So you tell patch to ignore
the /usr/src/ part of the diff output via:

patch -p3 < diff-file

Terry.

0
 
bod_1Author Commented:
There's a patch that I got with RedHat's libc rpm.  It has the BSD ioctl's so I'm trying to patch sgtty.h with it.  I tried
   patch -p[3 4 5] < /.../redhat.diff
from /usr/include but patch keeps saying all of the hunks fail.?
0
 
bod_1Author Commented:
Guess it's a bad patch or something.?
0
 
bod_1Author Commented:
just did it by hand, it works
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now