help using patch

Hendrik Volker Brunn hvb at gmx.net
Mon Jan 15 07:43:24 PST 2001


On Mon, Jan 15, 2001 at 07:05:09AM -0700, ken_i_m wrote:
> 
> um . . . actually I did. This is the first line from the patch I applied:

Sorry. Didn't want to embarass you.
 
> diff -adurpN glibc-2.2/CONFORMANCE glibc-2.2.1/CONFORMANCE

I wanted to point you to the shown directories.
 
> So, after trying a couple of variations with the -p option I went running 
> to the mail list for help. Even if I had figured out the correct 
> incantation with the -p option is still would not invalidate my question 
> which is "How do I figure out what options to pass patch?" Looking in the 
> diff file I saw "diff -adurpN" then some mysterious line of reasoning I am 
> suppose to come up with this "patch -Np1 < patchfile"?

In case you didn't name your directories like the developer before you,
you change into the source dir and strip the leading parts of the path
contained in the patch. So if you're passing -p1 it strips the first
part and patches CONFORMANCES in the current directory. N just keeps you
from adding same patch again.

Patch doesn't care much about how the diff was created. It cares about
the patch being unified and the path of the files to patch.


Perhaps I should better think for my own before posting... 8-)

Hendrik 8-)

-- 
"Denken sie auch, oder schlurfen sie nur sinnlos ueber die Erde?" (Kafka)


## Linux 2.4.0 running on an i586 ##

-- 
Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the blfs-support mailing list