Re: [gentoo-user] patch command

2003-07-13 Thread Spider
begin  quote
On Sun, 13 Jul 2003 02:33:25 -0500
Ian Truelsen <[EMAIL PROTECTED]> wrote:

> Okay, this is where I get to look all sheepish, but I have never been
> able to figure out the patch command. The man page itself does not
> clear anything up and I haven't been able to find anything via google
> that is not just a reprint of the man page or simply a reference to
> use patch.
> 
> Can anyone point me to a good reference for how to use patch?
> 

patch reads a patch file (as generated by diff) from standard in.

so either 
  cat file.patch |patch
or 
  patch < file.patch

They are the same.

patch also takes some options to mangle the incoming patch in different
ways, most notorious of theese is the -p command, which simply tells it
how many parts (from left to right, / separated) of the path  it shall
drop before it either finds a file, or gives up


if a patch is "unclean" (the existing data doesn't match the expected
data) there is either fuzz (when the data is there but a bit away) or
reject (generating a new , smaller patch file called filename.rej inside
the tree)



so, basically patch is a recipie for :
look at line 23 to 26 in file blabber for  FOO BAR BAZ
Change that to DOFUS FOO BAR 


//Spider



-- 
begin  .signature
This is a .signature virus! Please copy me into your .signature!
See Microsoft KB Article Q265230 for more information.
end


pgp0.pgp
Description: PGP signature


[gentoo-user] patch command

2003-07-13 Thread Ian Truelsen
On Sun, 13 Jul 2003 04:35:13 +0200
Marius Mauch <[EMAIL PROTECTED]> wrote:

> Ok, I've gathered my remaining C knowledge (doing too much java and
> scripting these days) and submitted patches for agetty and the manpage
> on bug 22275. The patch is based on the hostname utility from
> net-tools.
> 
Okay, this is where I get to look all sheepish, but I have never been
able to figure out the patch command. The man page itself does not clear
anything up and I haven't been able to find anything via google that is
not just a reprint of the man page or simply a reference to use patch.

Can anyone point me to a good reference for how to use patch?

-- 
Ian Truelsen
Email: [EMAIL PROTECTED]
AIM: ihtruelsen
Homepage: http://www.ihtruelsen.dyndns.org

--
[EMAIL PROTECTED] mailing list