Rockbox Development > Starting Development and Compiling
Using Patch
Fatman:
Im probably doing something silly...
Im trying to add a patch to the source ive downloaded via SVN:
patch < patchname.patch
I then get:
can't find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|Index: apps/misc.h
|===================================================================
|--- apps/misc.h (revision 15901)
|+++ apps/misc.h (working copy)
--------------------------
File to patch:
If i enter the filename exactly as listed in the Index value (apps/misc.h) then it works fine?
How can it not find the file, then when I type exactly the same path and filename, it finds it?
AlexP:
Where is your patch file? It should be in your checkout directory.
Also try with various p options
i.e.
patch -p0 < patch.patch
patch -p1 < patch.patch
etc.
bascule:
It probably means you are running the patch command from a different place in the filetree that the patch was generated from. This where the -p option comes in useful.
From the Wiki:
http://www.rockbox.org/twiki/bin/view/Main/SimpleGuideToCompiling#Patching
The third bullet point explains the -p option
Fatman:
I have the patch file in the same folder as ive check everything out to.
I have folder called rockbox - ls output below:
apps
bootloader
build
Build
Build
custom_splashV7.1.4.diff
dir.txt
docs
firmware
flash
fonts
gdb
manual
rbutil
tools
uisimulator
utils
wps
is this not where I should be running it from?
GodEater:
It's impossible to tell without seeing the content of the patch. Why not try with the -p options as you've been advised ?
Navigation
[0] Message Index
[#] Next page
Go to full version