Active Topics

 


Reply
Thread Tools
coderus's Avatar
Posts: 6,436 | Thanked: 12,701 times | Joined on Nov 2011 @ Ängelholm, Sweden
#1881
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)
__________________
Telegram | Openrepos | GitHub | Revolut donations
 
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#1882
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,
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#1883
Originally Posted by coderus View Post
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

Thanks for your help and wisdom, once again.
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,701 times | Joined on Nov 2011 @ Ängelholm, Sweden
#1884
now try to apply and unapply your patch after you remove tht files from /home/nemo/blah-blah
__________________
Telegram | Openrepos | GitHub | Revolut donations
 
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#1885
Originally Posted by coderus View Post
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.
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,701 times | Joined on Nov 2011 @ Ängelholm, Sweden
#1886
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.
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following User Says Thank You to coderus For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#1887
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).
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,701 times | Joined on Nov 2011 @ Ängelholm, Sweden
#1888
i'm using git for creating patches just because git is more convenient for me
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following User Says Thank You to coderus For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#1889
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.
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#1890
Originally Posted by Markkyboy View Post
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..
 

The Following 2 Users Say Thank You to Schturman For This Useful Post:
Reply

Tags
patchmanager, sailfish os


 
Forum Jump


All times are GMT. The time now is 04:47.