[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Basic patching question

From: David Jonathan Kanter <david_(_dot_)_kanter_(_at_)_mindspring_(_dot_)_com>
Subject: Basic patching question
Date: Tue, 5 Dec 2000 20:42:13 -0600

> I need help assuring that I've applied a patch correctly. I've read the faq
> and the patch file, but I'm still confused.
> It's the new ftpd patch. I put the patchfile in /usr/src, then cd'ed to
> /usr/src and issued patch -p0 < patchfile. Everything seemed fine, except
> that there's no line in the revised file (ftpd.c) that has the new dateline:
> 2000/12/05.
> Shouldn't this be there?

no, at least not according to my local copy of the patch.

are you referring to the portion of the patch file that looks like

  +++ libexec/ftpd/ftpd.c 2000/12/05 17:12:01


that portion doesn't make it into the patched result.

a rough explanation:

what makes it into the result is the stuff that comes after the
single leftmost plus signs.

the stuff that comes after the single rightmost minus signs in the
same area get carved out.

what comes before:

  @@ -1924,15 +1924,21 @@

does not make it into the patched result.

you can see this in action by using the diff and patch commands (which
also have man pages) on some sample test files of your own creation.

i recommend testing and man pages for fuller enlightenment.