[gobolinux-users] Recipe / patch question

Jonas Karlsson jonka750 at student.liu.se
Sun Nov 26 15:32:03 UTC 2006


On Sun, 26 Nov 2006 12:25:55 +0100, V <mkdm_2000 at yahoo.com> wrote:

> Hi,
>
> "Jonas Karlsson" wrote:
>
>> > is an svn server and with my current recipe, the
>> > program appears in /Files/Compile/Sources/ as
>> > "trunk-program".
>>
>> Does it appears as "trunk-program" or as
>> "trunk-<program>" (the difference
>> is that the latter has the program name instead of
>> <program>)?
>
>> Why I ask
>> is because it should be listed as "<program>-svn"
>> (not that it realy
>> matters if it works, but still behaviour should be
>> consistant). Which
>> version of Compile do you use?
>
> It appears as trunk-the_program_name .  i.e. if I was
> compiling "nano", it would appear as trunk-nano.
>
> I'm using Compile 1.60 on Gobo_012 .  I keep
> forgetting the commands to run after one installs a
> new version of the Compile scripts -- I think whatever
> needs to be run should be done automatically, so I've
> just been sticking with what's on the working machine.
>
Ah, that explains it - Compile 1.6.0 still have the old behaviour  
regarding svn source checkout.
There should be no problem with updating Copile or Scripts in the later  
releases. I think the problem was whith UpdateSettings and a required file  
in Scripts 2.2.2/Compile 1.4.1 release and should be gone now. Could you  
please try to upgrade and tell us if there's something that doesn't work?

>> Compile do apply the patches from within the folder,
>> but it does it with
>> '-p1', stripping of one directory. What you should
>> do is edit the patches
>> and add a slash and something before each listing.
>
> Can we add an option to the Recipe that allows one to
> specify the patch "level" (i.e. p0, p1, etc) or
> override the default "-p1" ?  I think editing someone
> else's patches to work around an assumption that
> Compile makes is a bad idea.
>
Well, how would you do it if you had several patches with different levels  
of paths? I don't think it's a good idea to implement this.
There are two ways to convert patches to the correct level of directories.  
If you have some small patches you can just edit them. For larger amounts  
of patches see below.

> In my case I have six patches and some are hundreds of
> lines long.  The problem is the files that are patched
> are random so I'd have to use some cleverness in
> hunting for "Index", etc to insert the preceding
> folder name...just to have it stripped by Compile.
>
As it is a bunch of patches you need to convert I suggest that you do it  
like this:

1) Make two copies of the directory containing the clean sources.
2) Apply the patches to one.
3) Change directory to ../ and do a diff: 'diff -Naur clean-sources  
patched-sources > new_patch.patch'.
4) Then apply the reverse patch to the patched sources and repeat from 1)  
with the next patch.

-- 
/Jonas

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


More information about the gobolinux-users mailing list