maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak (https://talk.maemo.org/showthread.php?t=92935)

coderus 2016-03-26 17:53

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
patchmnager applying patches with -p 1, so you need something before original path starting. look at existing patches to understand. and both paths should point to target files (/usr/share/bla-bla, not /home/nemo)

Markkyboy 2016-03-26 17:58

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
hahaha!, okay, well problem solved, yet I don't know quite what has occurred....(aka - fuctifino!)

I diff'd the files again, merged the two outputs for a new unified_diff.patch, made the RPM, installed it and now it applies.

Okay, YES, I did close the white space following coderus's observations (but I had already tried this by closing that white space manually), which again, as stated by coderus, is something we shouldn't do.

Problem solved, thank you for you input @coderus, it is appreciated. (wrong files eh...?, well, it works, so what can I say?) ;)

Regards,

Markkyboy 2016-03-26 18:08

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
Quote:

Originally Posted by coderus (Post 1502189)
patchmnager applying patches with -p 1, so you need something before original path starting. look at existing patches to understand. and both paths should point to target files (/usr/share/bla-bla, not /home/nemo)

Then you have learned something new, no?, my editing directory is in /home/nemo/usr/share/bla/bla - so that's where I tell diff to look - but the way I have done it like this and it works, so what can I say? - perhaps because I am already working in nemo that I don't need to add /home/nemo to the path - but again, I'm more interested in the mechanics of patching rather than how to it like a total pro - that will come later :D

Thanks for your help and wisdom, once again.

coderus 2016-03-26 18:34

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
now try to apply and unapply your patch after you remove tht files from /home/nemo/blah-blah

Markkyboy 2016-03-26 19:57

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
Quote:

Originally Posted by coderus (Post 1502195)
now try to apply and unapply your patch after you remove tht files from /home/nemo/blah-blah

I see what you are saying, going to do that now - okay, right, I have just done what you suggested and yet, my patch still installs/applies/unapplies and can be reapplied again - working, even after rebooting in between applying/unapplying.

When I first unapplied patch - messages says 'patch removed:' - so I 'reload system services' and apply the patch, it says 'patch installed' - the effects of the patch are still working. So, it seems your theory doesn't stand. After all, if that did make the difference, then no patch would ever work on someone else's device as it wouldn't have the original construction data to 'look' back at or whatever goes on........no?, so I don't get where you are coming from - I'm not trying to be difficult here, it;s just what you say holds no weight in this situation.

coderus 2016-03-27 05:35

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
okay, seems for patchmanager it's enough to have one correct path, not both. but diff/patch docs says both paths should be correct, so i don't know why it's working on jolla.

Markkyboy 2016-03-27 18:21

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
It seems there is more than one way to get the same result, I'm not surprised really.

How do you have your build system set up?, where is your 'b' /usr/share/bla' folder set-up? (I'm guessing in root, along side the original '/usr/share/bla' folder).

coderus 2016-03-27 18:29

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
i'm using git for creating patches just because git is more convenient for me :)

Markkyboy 2016-03-27 20:40

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
Okay, I have found git-diff on the device with many other git-* bin files.

I just diff'd two existing .patch files and the ouput is printed on screen, cool and convenient.

So, when you make a patch, I assume you take a copy of the original file, place it somewhere and edit - yes/no?, if you do it that way, where do you place your files to edit?, I ask, as your earlier comments suggest you don't have an alternate file structure for placing files to edit.

Schturman 2016-03-28 06:26

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
Quote:

Originally Posted by Markkyboy (Post 1502263)
Okay, I have found git-diff on the device with many other git-* bin files.

I just diff'd two existing .patch files and the ouput is printed on screen, cool and convenient.

So, when you make a patch, I assume you take a copy of the original file, place it somewhere and edit - yes/no?, if you do it that way, where do you place your files to edit?, I ask, as your earlier comments suggest you don't have an alternate file structure for placing files to edit.

You don't use SDK, I'm right?
I do it this way in same directory:
1.
Code:

cp /path/file.qml /path/file.qml.org
2. Do manual changes to file.qml and check if it work.
3. Create .patch file:
Code:

diff -u /path/file.qml.org /path/file.qml > /path/unified_diff.patch
4. Restore file.qml.org file:
Code:

mv /path/file.qml.org /path/file.qml
5. Package your patch and try to apply/unapply..
;)


All times are GMT. The time now is 18:34.

vBulletin® Version 3.8.8