Solved

diff files

Posted on 1998-11-27
4
244 Views
Last Modified: 2013-11-13
How can I 'install' a diff file with a lot of patches inside.
Say, redhat.diff
I keep getting rejected
0
Comment
Question by:bod_1
  • 3
4 Comments
 
LVL 1

Accepted Solution

by:
terrycj earned 50 total points
ID: 1638628
> 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
 

Author Comment

by:bod_1
ID: 1638629
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
 

Author Comment

by:bod_1
ID: 1638630
Guess it's a bad patch or something.?
0
 

Author Comment

by:bod_1
ID: 1638631
just did it by hand, it works
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Guacamole cut and paste issue 3 75
Oracle 10g standard edition server with 4 processors 3 55
Linux VM 6 90
DCOM errors in Server 2016 2 38
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question