android
  #1  
Old 01-10-2008, 07:43 PM
Ronoh55 Ronoh55 is offline
Junior Member
 
Join Date: Jan 2008
Location: MI, US
Posts: 43
Default problem patching

everytime I try to patch (with any patch) it comes up with:

Quote:
can't find file to patch at line 5
perhaps you used the wrong -p or --strip option?
the text leading up to this was
------------------------------
Index: apps/keymaps/keymap-e200.c
=============================================
--- apps/keymaps/keymap-e200.c (revision 14682)
+++ apps/keymaps/keymap-e200.c (working copy)
-------------------------------
file to patch:
Ive tried the file in the text and it keeps on failing, what should/can I do to get this patching correctly?

Edit: I am using yesterday's svn, I'm updating to today's currently though
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 01-10-2008, 08:22 PM
chrisjs162216 chrisjs162216 is offline
Ultra Senior Member
 
Join Date: Oct 2006
Location: Somewhere
Posts: 1,515
Default

cd rockbox

(or whatever directory you downloaded the copy of SVN to.
Reply With Quote

  #3  
Old 01-10-2008, 08:27 PM
Ronoh55 Ronoh55 is offline
Junior Member
 
Join Date: Jan 2008
Location: MI, US
Posts: 43
Default

That is where I am, it is also where the patches are.
Reply With Quote

  #4  
Old 01-10-2008, 08:28 PM
chrisjs162216 chrisjs162216 is offline
Ultra Senior Member
 
Join Date: Oct 2006
Location: Somewhere
Posts: 1,515
Default

Quote:
Originally Posted by Ronoh55 View Post
That is where I am, it is also where the patches are.
Can you do 'pwd' and 'ls' and paste the results so I can see what's happening?
Reply With Quote

  #5  
Old 01-10-2008, 08:33 PM
Ronoh55 Ronoh55 is offline
Junior Member
 
Join Date: Jan 2008
Location: MI, US
Posts: 43
Default

great...now its working! at least with the first of the patches I tried...still trying to reproduce the problem after updating to todays source.
Reply With Quote

  #6  
Old 01-10-2008, 08:38 PM
Ronoh55 Ronoh55 is offline
Junior Member
 
Join Date: Jan 2008
Location: MI, US
Posts: 43
Default

I would love to copy the results of the error...i reproduced it with the next patch...but how do I do it with cygwin? other than typing it all out (which would be a pain, and is what I did above)
Reply With Quote

  #7  
Old 01-10-2008, 09:10 PM
chrisjs162216 chrisjs162216 is offline
Ultra Senior Member
 
Join Date: Oct 2006
Location: Somewhere
Posts: 1,515
Default

Right click the cygwin icon at the top right, go down to Edit, and select mark. Highlight the areas you want to copy, and press enter to copy.
Reply With Quote

  #8  
Old 01-10-2008, 09:16 PM
Ronoh55 Ronoh55 is offline
Junior Member
 
Join Date: Jan 2008
Location: MI, US
Posts: 43
Default

OK, I will have it up momentarily then!
Reply With Quote

  #9  
Old 01-10-2008, 09:17 PM
kugel's Avatar
kugel kugel is offline
Rockbox Developer
 
Join Date: Dec 2006
Location: Berlin, Germany
Posts: 1,153
Default

Quote:
Originally Posted by Ronoh55 View Post
I would love to copy the results of the error...i reproduced it with the next patch...but how do I do it with cygwin? other than typing it all out (which would be a pain, and is what I did above)
Just play with the -p option. This would be -pX where X is a number between 0 and 5. 1 of those numbers is allways correct
__________________
;;
Reply With Quote

  #10  
Old 01-10-2008, 09:23 PM
Ronoh55 Ronoh55 is offline
Junior Member
 
Join Date: Jan 2008
Location: MI, US
Posts: 43
Default

Quote:
Administrator@Media-Center /cygdrive/c/rockbox
$ patch --binary -p0 < play_to_wps.diff
patching file apps/keymaps/keymap-e200.c
Hunk #1 FAILED at 104.
Hunk #2 FAILED at 148.
Hunk #3 FAILED at 200.
3 out of 3 hunks FAILED -- saving rejects to file apps/keymaps/keymap-e200.c.re


Administrator@Media-Center /cygdrive/c/rockbox
$ patch --binary -p1 < play_to_wps.diff
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: apps/keymaps/keymap-e200.c
|================================================= ==================
|--- apps/keymaps/keymap-e200.c (revision 14682)
|+++ apps/keymaps/keymap-e200.c (working copy)
--------------------------
File to patch: apps/keymaps/keymap-e200
apps/keymaps/keymap-e200: No such file or directory
Skip this patch? [y]
Skipping patch.
3 out of 3 hunks ignored

Administrator@Media-Center /cygdrive/c/rockbox
$ pwd
/cygdrive/c/rockbox

Administrator@Media-Center /cygdrive/c/rockbox
$ ls
apps build firmware fonts manual rbutil uisimulator wps
bootloader docs flash gdb play_to_wps.diff tools utils
there it is. Where it says no such directory I forgot to add ".c" to the file name but it fails just like the first try above it
Reply With Quote

  #11  
Old 01-10-2008, 09:26 PM
Ronoh55 Ronoh55 is offline
Junior Member
 
Join Date: Jan 2008
Location: MI, US
Posts: 43
Default

Quote:
Originally Posted by kugel View Post
Just play with the -p option. This would be -pX where X is a number between 0 and 5. 1 of those numbers is allways correct
I have gone through -p0 to -p5. no change in the messages, but I will be willing to try again if it means getting the patches done.
Reply With Quote

  #12  
Old 01-10-2008, 09:38 PM
saratoga saratoga is offline
Rockbox Developer / Moderator
 
Join Date: Apr 2007
Posts: 3,584
Default

Quote:
Originally Posted by Ronoh55 View Post
I have gone through -p0 to -p5. no change in the messages, but I will be willing to try again if it means getting the patches done.
There is a change in the messages.

p0 gives " patching file"

p1 gives "can't find file to patch"
" Perhaps you used the wrong -p"

p0 is what you want to use. Then check those rejection files it made to see why your patch didn't work, and then try and fix it.
Reply With Quote

  #13  
Old 01-10-2008, 09:55 PM
Ronoh55 Ronoh55 is offline
Junior Member
 
Join Date: Jan 2008
Location: MI, US
Posts: 43
Default

I dont know how to read C lol. Do you know of a place that has a good guide to learn enough to work on RB?
Reply With Quote

  #14  
Old 01-10-2008, 10:15 PM
chrisjs162216 chrisjs162216 is offline
Ultra Senior Member
 
Join Date: Oct 2006
Location: Somewhere
Posts: 1,515
Default

You don't really need to know C in order to patch failed hunks. While sometimes it can be confusing, usually you just need to look in the file for the line before the added part starts, and add it manually.
Reply With Quote

  #15  
Old 01-10-2008, 10:21 PM
Ronoh55 Ronoh55 is offline
Junior Member
 
Join Date: Jan 2008
Location: MI, US
Posts: 43
Default

ok...i think I get what you mean, so I have to add the code from the rejection file to the .c file right?
Reply With Quote

  #16  
Old 01-16-2008, 08:53 PM
Ronoh55 Ronoh55 is offline
Junior Member
 
Join Date: Jan 2008
Location: MI, US
Posts: 43
Default

(I figured I should ask in this thread so I don't clutter the forum with new threads, I'm sorry if I figured wrong)
anyways,on to the problem...I get this:
Quote:
CC misc.c
misc.c: In function 'show_splash':
misc.c:945: error: too few arguments to function 'read_bmp_file'
misc.c:952: error: too few arguments to function 'read_bmp_file'
make[1]: *** [/cygdrive/c/rockbox/build/apps/misc.o] Error 1
when I compile the custom splash patch here. how can I fix this problem?
Reply With Quote

  #17  
Old 01-17-2008, 12:47 PM
gratt gratt is offline
Junior Member
 
Join Date: Dec 2006
Posts: 31
Default fix custom splash with bmp resize

The error you are getting is related to the bitmap resize patch.
Look in the misc.c file for the show_splash function.
The portion that reads the bmp file need to be replaced with the
commented out portions "//". There are comments in the function that help.
The bmp resize patch adds additional arguments for the resizing.

The custom_splash patch is now closed on FS7538.
Attached is the latest version.
or it is still available at this link for a time.
http://www.rockbox.org/tracker/task/7538

GRaTT
Attached Files
File Type: txt custom_splashV7.1.5.diff.txt (9.9 KB, 4 views)
Reply With Quote

  #18  
Old 01-17-2008, 07:46 PM
Ronoh55 Ronoh55 is offline
Junior Member
 
Join Date: Jan 2008
Location: MI, US
Posts: 43
Default

thanks for all the help! I will try it later as I am extremely tired right now (school then drivers ed till bout an hour ago). I just hope I can get it working
Reply With Quote

  #19  
Old 01-17-2008, 09:08 PM
Ronoh55 Ronoh55 is offline
Junior Member
 
Join Date: Jan 2008
Location: MI, US
Posts: 43
Default

YAY new problems!
Quote:
CC misc.c
misc.c: In function 'show_splash':
misc.c:945: error: too few arguments to function 'read_bmp_file'
misc.c:947: warning: left-hand operand of comma expression has no effect
misc.c:947: warning: left-hand operand of comma expression has no effect
misc.c:948: warning: left-hand operand of comma expression has no effect
misc.c:948: error: syntax error before ')' token
misc.c:952: error: too few arguments to function 'read_bmp_file'
misc.c:954: warning: left-hand operand of comma expression has no effect
misc.c:954: warning: left-hand operand of comma expression has no effect
misc.c:955: warning: left-hand operand of comma expression has no effect
misc.c:955: error: syntax error before ')' token
misc.c:1164: error: syntax error at end of input
make[1]: *** [/cygdrive/c/rockbox/build/apps/misc.o] Error 1
This is after removing comment marks
Reply With Quote

  #20  
Old 01-24-2008, 03:32 PM
disorganizer disorganizer is offline
Member
 
Join Date: Jun 2007
Posts: 141
Default

wouldnt it be a good idea to have a subforum for patches closed but still maintained at abi?
the so called "abandoned patches forum" :-)

will anyone volunteer to maintain the above patch (splashscreen patch)?
__________________
my wps's for rockboxed sansa-E:
normal with viewports
maxed out AA with viewports
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 03:15 PM.