Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: audiophile007 on July 28, 2008, 02:10:56 PM

Title: patching latest build/release
Post by: audiophile007 on July 28, 2008, 02:10:56 PM
I had 2006 Rockbox version on my iaudio X5 which had a greatest future of them all: "one click music directory insert into the active playlist" it was made possible by the custom build somebody compilied using "insert.patch" file.

I have this patch file and I am trying to upgrade to the latest rockbox release and thought that future  would be incorporated as a standard option ..but not  its not there for whatever reason...???
anyway I tried to patch based on multiple description on this and other sites..and nothing works..I get Hunk#1 error all the time. its asking what is the file being patched..etc.

can someone post a complete detailed protocol with all steps and an example of all writings that should take place (what program to open/run;  what files should be where and  in what directories etc.etc.etc.) how to patch the current build.

thank you so much, please shoot me an email, Alex
Title: Re: patching latest build/release
Post by: saratoga on July 28, 2008, 02:40:48 PM
Patches are usually specific to the version of the code they were made against.  As people change the code, the patch becomes out of sync and can no longer be applied.  The hunk error generally means the code that patch changes no longer exists, or at least has been moved or changed beyond recognition.

You'll need to find an updated version of that patch, or write your own.  Since that patch probably came from our patch tracker, thats the first place I'd look.
Title: Re: patching latest build/release
Post by: ryran on July 28, 2008, 10:02:59 PM
saratoga's absoultely right--assuming you are talking about FS#2653 (http://www.rockbox.org/tracker/task/2653), you can just download the latest version at the bottom of the page. It applies just fine.
Title: Re: patching latest build/release
Post by: audiophile007 on July 29, 2008, 01:45:45 AM
I downloaded the latest insert.patch version at the bottom of the page and applied to current build for iaudio X5  IT DOES NOT WORK !

I am still amazed this future is not introduced in current version 2 years later ?!

can someone more knowledgeable with programing compile a build that would combine current daily build for iaudio x5 + insert.patch

it makes playlist management so much easier , but I wasted 3 days trying to figure out patching.....can someone help with working tested files ??
Title: Re: patching latest build/release
Post by: Llorean on July 29, 2008, 01:50:58 AM
Maybe if it worked fully and were tested on all targets and had an author who actively showed an interest in discussing the patch and addressing concerns with it...

Why would you be amazed a patch doesn't get accepted if it's practically abandoned? It has bugs, as can clearly be noted in the comments on it. Why should anyone want to commit a buggy patch? It is a hacky patch and is not in a state where it's committable. You don't get things committed by doing 1/3 of the job and saying "Okay guys, you need to fix it for me and commit it."
Title: Re: patching latest build/release
Post by: ryran on July 29, 2008, 12:44:53 PM
Llorean's right of course regarding the patch not yet making its way into the "current build" but I don't see what your problem is with applying it. I compile builds with this included every few days. If you're getting failures of some kind then something is wrong with your local copy of SVN. I'm thinking maybe you didn't do an svn revert -R . from your trunk (rockbox) directory before you applied the new version?
Title: Re: patching latest build/release
Post by: audiophile007 on July 29, 2008, 01:57:10 PM
RYRAN

Can you please compile a build that would combine current daily build for iaudio x5 + insert.patch FS#2653 and put it somewhere for download.Would really appreaciate it.

As for the bugs...it worked flawlessly on my old rockbox ~2006 and for 2 years never had problems with it... I am not the author nor the programmer, so I can't add anymore information....but from the user point of view it was an excellent option that was overlooked when it did work for rockbox....

anyways I dont't want to go into the long arguments, I wold really appreciate if someone can compile such a build: current daily build for iaudio x5 + insert.patch FS#2653 (latest version at the bottom of the page)
Title: Re: patching latest build/release
Post by: Llorean on July 29, 2008, 02:01:52 PM
It didn't even work back then for all players. You need to remember, Rockbox runs on many MP3 players. It also, even in the very first version, had a negative effect on navigating menus.

Just because it affected features in a way you didn't notice, doesn't mean it didn't have bugs. It just means you didn't notice them.
Title: Re: patching latest build/release
Post by: ryran on July 29, 2008, 02:26:01 PM
If it were trivial for me to compile you a build for the x5, I would. Once.
I don't have the Coldfire compiler setup on my server though. I only have ARM targets.

You didn't respond to my last post -- if you've already figured out how to patch and compile, I really think your only problem is that your checked out copy of SVN has already been modified by the old insert patch, which failed, and now you're trying to patch on top of that using the new one. It seems likely to me that all you need to do is revert your local copy like I said, before you try to apply the new patch...
Title: Re: patching latest build/release
Post by: audiophile007 on July 29, 2008, 04:00:27 PM
Ryran,

all I am doing is running patch.exe from cmd.exe and telling it to patch <insert.patch
all files are located in .rockbox folder these files are : newly downloaded daily rockbox build unzipped (never patched before) + latest version of insert.patch file 

the response I get after running the patch.exe is

Hunk#1 failed at 140
Can't rename insert.patch to insert.patch.orig : Permission denied

what does it mean..is it worth wasting another 3 days...or can someone do it in 3 minutes who is familiar with programming...
Title: Re: patching latest build/release
Post by: saratoga on July 29, 2008, 04:06:45 PM
Ryran,

all I am doing is running patch.exe from cmd.exe and telling it to patch <insert.patch
all files are located in .rockbox folder these files are : newly downloaded daily rockbox build unzipped (never patched before) + latest version of insert.patch file 


You can't patch a build.  You patch code.  Read the working with patches wiki page:

http://www.rockbox.org/twiki/bin/view/Main/DocsIndex#For_Developers
Title: Re: patching latest build/release
Post by: audiophile007 on July 29, 2008, 04:46:37 PM
I read those wiki pages many times..and all instructions on patching BUT I am not a programmer they are not comprehensive to me... I need more instructions:

where is the file with the code ? I need a direct link
where do I put it ?
where do I put a .patch file ?
what programs do I run ?
in what sequence ?

et.etc.etc


I need a most detailed comprehensive example...

Title: Re: patching latest build/release
Post by: MarcGuay on July 29, 2008, 04:57:51 PM
Unfortunately the step-by-step is already written down in those wiki pages and it doesn't get much easier than that.  It's only a few more button presses to insert it manually - perhaps it would be easier to just get used to that?
Title: Re: patching latest build/release
Post by: saratoga on July 29, 2008, 05:08:34 PM
I need a most detailed comprehensive example...

Did you even look?  For instance:

http://www.rockbox.org/twiki/bin/view/Main/DevelopmentGuide

Its literally a step by step guide.  Either read or don't bother asking questions.
Title: Re: patching latest build/release
Post by: audiophile007 on July 29, 2008, 05:36:26 PM
this is really something with you.. :-\ what do you think i ve lost 3 days doing and another day arguing with you !!!! yes I ve looked , yes I ve read !!!! cant you answer a simple question where is the code file ??!!!! and how to patch it ??!!!

and by the way if your "wonderful and comprehensive " instructions were that helpful there would not be hordes of people asking how to patch a file...just look around at the forums, so surely support team lacks connection on this side
Title: Re: patching latest build/release
Post by: Llorean on July 29, 2008, 05:38:37 PM
It's NOT a simple question. It's a complicated process, which is why we wrote guides.

The guides are our answers to those questions, so asking them again doesn't make us suddenly be able to know which part of the guide is confusing you.

Tell us what step you get to, and what confuses you about it, and maybe we can help better, but if you keep saying "how do I do it" we're not going to retype hundreds of lines to answer it for you when we've already done it once. Try asking clearer and more precise questions about specific parts of the guide.
Title: Re: patching latest build/release
Post by: saratoga on July 29, 2008, 08:12:48 PM
!!!! yes I ve looked , yes I ve read !!!! cant you answer a simple question where is the code file ??!!!! and how to patch it ??!!!

The problem here is that your question sucks.  You have to start at the beginning, so you can't skip ahead to patching until you've done the previous steps.  You've seen this first hand when you tried to patch without having the code.  Take a look at that link, and start with the first step, and then go from there.

I'm sorry you've "wasted" time learning about programming, but honestly, if you'd just started with the directions and followed them in sequence, you'd have saved yourself a lot of hassle, and us a lot of trouble trying to guess which steps you'd skipped. 

and by the way if your "wonderful and comprehensive " instructions were that helpful there would not be hordes of people asking how to patch a file...

People ask questions because its a natural part of learning.   
Title: Re: patching latest build/release
Post by: audiophile007 on July 29, 2008, 08:56:38 PM
and by the way if your "wonderful and comprehensive " instructions were that helpful there would not be hordes of people asking how to patch a file...

Quote from: saratoga

The problem here is that your question sucks.

People ask questions because its a natural part of learning.   
[/quote]

Really ?? I did not know this..and you pretend to be a divine creature who gives recommendations without addressing specific issues...than your answer sucks !
Title: Re: patching latest build/release
Post by: Febs on July 29, 2008, 09:05:01 PM
I've had enough of this.  Thread closed.
Title: Re: patching latest build/release
Post by: saratoga on July 29, 2008, 09:06:52 PM
Really ??

Yes, read the next sentence, I went into more detail.

I did not know this..

Well obviously, otherwise you wouldn't have asked it.

and you pretend to be a divine creature who gives recommendations without addressing specific issues...than your answer sucks !

Well I'm not sure that understanding how to compile c code makes me godlike, but that issue aside, I didn't give you an answer.  Instead I told you where to find it for yourself.  Which is basically how one learns about things.  

Its starting to sound a bit like you're not too interested in actually getting this patch working.  If not, I'd recommend you sit down and read more carefully.  You have all the answers you need.  Just spend a few minutes looking over them and come back when you have good questions (or ideally don't come back since you've gotten it to work).

Edit:  bah too slow.