bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: patch 2.5.4 bug


From: Stepan Kasal
Subject: Re: patch 2.5.4 bug
Date: Thu, 30 May 2002 09:58:02 +0000 (UTC)
User-agent: slrn/0.9.6.2 (Linux)

On Wed, 29 May 2002 14:35:46 +0200, Zoltan Menyhart wrote:
> I think it is a bug that I am obliged to use '-p 0' if I have
> nothing to skip.
> If I am in /home/menyhart/2.4.18/linux and I want to patch a file
> e.g. /home/menyhart/2.4.18/linux/arch/ia64/kernel/Makefile then
> I'd think of using '-p 4' but it works only with '-p 5'.

Hallo,
        I'm quite sure that this basic function of patch works as documented.

1) If no -p option is given, the current directory is searched and any
path stored in the patch is ignored.

2) If you give -p1 (or, generally, -p<n>), the path stored in the patchfile
is stripped--the leading portion up to first (or n-th), slash is stripped.

Thus, if you have patch starting with

--- linux-1.2.3/arch/ia64/kernel/Makefile       Thu Jan  1 01:00:00 1970
+++ linux-2.5.104/arch/ia64/kernel/Makefile     Tue May 28 09:19:27 2002

and call patch with -p1, the file "arch/ia64/kernel/Makefile" is patched.
If you called patch with -p2 or -p4, the file "ia64/kernel/Makefile" or
"Makefile" would be patched.

If the patch stored in patchfile is absolute, the leading slash counts.

Read "man patch".

HTH,
        Stepan Kasal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]