Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: How to install patches?

Re: How to install patches?

From: <Gajdos_at_metatem.net>
Date: Sat, 17 Apr 2004 01:06:10 +0200 (CEST)

On Thu, 15 Apr 2004 at 13:09, Lucas wrote:

> Thanks a lot for your help! I was able to sucessfully patch a .diff file.
Feels good, eh? :^)

> I'm trying to patch a WPS patch (#871285) now, but I get an error:
>
> missing header for unified diff at line 10 of patch
> can't find file to patch at input line 10
> Perhaps you used the wrong -p or --strip option?
> The text leading up to this was:
> --------------------------
> |? build
> |? file.patch
> |Index: apps/tree.c
> |=============================================================
> |RCS file: /cvsroot/rockbox/apps/tree.c,v
> |retrieving revision 1.220
> |diff -u -r1.220 tree.c
> |--- apps/tree.c 22 Dec 2003 09:48:18 -0000 1.220
> |+++ apps/tree.c 5 Jan 2004 22:52:55 -0000
> --------------------------
> File to patch:
>
>
> Any ideas? or is the patch faulty? (I tried -p0 and -p2 as you suggested,
> but -p2 gives me the same error and p-1 gives me another error entirely.

The feedback you get means that you're not in the right place in the
directory structure for that diff file, so it's probably the -p1 you want.

When the diff looks like above (with "apps/tree.c"), it should work fine
if you CD to the main rockbox directory (parent of your build dir) and do:

patch -p0 <patchfile

because the directories below your position resemble what's in the diff.
Know what I mean?

If that doesn't work, then the diff is most likely done a while back, and
the patching will require some human intervention. The generated .rej
contain what couldn't be done automagically.

You can do
patch --dry -p0 <patchfile
first to check what will happen.

Good luck,
/JG
_______________________________________________
http://cool.haxx.se/mailman/listinfo/rockbox
Received on 2004-04-17

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy