|
2016-03-25
, 21:48
|
|
Posts: 433 |
Thanked: 727 times |
Joined on Oct 2012
@ Costa Blanca, Espaņa
|
#1872
|
%description Control the volume with 2 fingers portrait or both thumbs in landscape mode %files /usr/share/patchmanager/patches/sailfishos-patch-two-fingers-volume-control/* %pre if [ $1 = 1 ]; then // Do stuff specific for first install echo "It's first time install" else if [ $1 = 2 ]; then // Do stuff specific to upgrades echo "It's just upgrade" /usr/sbin/patchmanager -u sailfishos-patch-two-fingers-volume-control fi fi %preun if [ $1 = 0 ]; then // Do stuff specific to uninstalls /usr/sbin/patchmanager -u sailfishos-patch-two-fingers-volume-control else if [ $1 = 1 ]; then // Do stuff specific to upgrades echo "It's just upgrade" fi fi %postun if [ $1 = 0 ]; then // Do stuff specific to uninstalls rm -rf /usr/share/patchmanager/patches/sailfishos-patch-two-fingers-volume-control else if [ $1 = 1 ]; then // Do stuff specific to upgrades echo "It's just upgrade" fi fi %changelog
|
2016-03-26
, 00:43
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#1873
|
Hey guys, I wonder if anyone can shed some light on a weird but not so troubling problem.
I've made a patch (RPM), the app installs to patchmanager, but patchmanager can't apply and an error message just says 'failed to install'.
My patch makes some very minor changes in 'compositor.qml' and 'VolumeControl.qml'.
I am able to make my changes manually to the device and they work, even after a reboot.
So, why can I not apply the patch? - now, as the changes work when done manually, I'm going to assume that my spec file is the problem, as I get an error when uninstalling the patch.rpm; something like ("// error: line 2: is a directory) with a message about the %preun section - but the thing is, all my other patches are structured in the same way and they all install/patch/work/unapply/uninstall - but not this one.
Here's the spec contents; (shortened)
Any information gratefully receivedCode:%description Control the volume with 2 fingers portrait or both thumbs in landscape mode %files /usr/share/patchmanager/patches/sailfishos-patch-two-fingers-volume-control/* %pre if [ $1 = 1 ]; then // Do stuff specific for first install echo "It's first time install" else if [ $1 = 2 ]; then // Do stuff specific to upgrades echo "It's just upgrade" /usr/sbin/patchmanager -u sailfishos-patch-two-fingers-volume-control fi fi %preun if [ $1 = 0 ]; then // Do stuff specific to uninstalls /usr/sbin/patchmanager -u sailfishos-patch-two-fingers-volume-control else if [ $1 = 1 ]; then // Do stuff specific to upgrades echo "It's just upgrade" fi fi %postun if [ $1 = 0 ]; then // Do stuff specific to uninstalls rm -rf /usr/share/patchmanager/patches/sailfishos-patch-two-fingers-volume-control else if [ $1 = 1 ]; then // Do stuff specific to upgrades echo "It's just upgrade" fi fi %changelog
Regards,
The Following User Says Thank You to Schturman For This Useful Post: | ||
|
2016-03-26
, 03:02
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#1874
|
|
2016-03-26
, 11:45
|
|
Posts: 433 |
Thanked: 727 times |
Joined on Oct 2012
@ Costa Blanca, Espaņa
|
#1875
|
if you cant apply patch its 100% problem in patch
spec file is for building and installing package
|
2016-03-26
, 12:06
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#1876
|
Thanks coderus, you may laugh, but there are no other patches installed. In fact a fresh install of patchmanager after installing lipstick-jolla-home-qt5 DIR again. I appreciate what you are saying and I know you know your stuff. But there are no other patches installed. So, if it is not to do with the spec file, why th error warning about Line 2: in %preun section..??
Also, @schturman - how do I check that I created the patch correctly? - I have altered my unified_diff.patch several times, putting voljmecontrol qml diff first then compositor.qml and vice versa.........if I make the alterations manually, the idea works, but trying to patch it, it fails. Weird.
The Following User Says Thank You to Schturman For This Useful Post: | ||
|
2016-03-26
, 12:51
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#1877
|
|
2016-03-26
, 17:00
|
|
Posts: 433 |
Thanked: 727 times |
Joined on Oct 2012
@ Costa Blanca, Espaņa
|
#1878
|
for example you can post your patch here and someone can show where is your fault.
and you should never alter patch file by hand, you should use git or diff tool instead.
--- /usr/share/lipstick-jolla-home-qt5/volumecontrol/VolumeControl.qml 2016-03-25 00:55:30.75196045$ +++ /home/nemo/usr/share/lipstick-jolla-home-qt5/volumecontrol/VolumeControl.qml 2016-03-25 2$ @@ -250,7 +250,7 @@ extend: "showBar" PropertyChanges { target: volumeBar - showContinuousVolume: Screen.sizeCategory >= Screen.Large + showContinuousVolume: Screen.sizeCategory >= Screen.Small } } ] --- /usr/share/lipstick-jolla-home-qt5/compositor.qml 2016-03-25 00:46:03.301257118 +0000 +++ /home/nemo/usr/share/lipstick-jolla-home-qt5/compositor.qml 2016-03-25 23:30:50.841993709 +0000 @@ -222,10 +222,10 @@ MultiPointTouchDrag { id: globalVolumeGestureItem - enabled: !systemGesturesDisabled && SS.Screen.sizeCategory >= SS.Screen.Large + enabled: !systemGesturesDisabled && SS.Screen.sizeCategory >= SS.Screen.Small orientation: Lipstick.compositor.topmostWindowOrientation - fingers: 3 - direction: MultiPointTouchDrag.Vertical + fingers: 2 + direction: MultiPointTouchDrag.Horizontal } function updateScreenOrientation() {
|
2016-03-26
, 17:10
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#1879
|
|
2016-03-26
, 17:23
|
|
Posts: 433 |
Thanked: 727 times |
Joined on Oct 2012
@ Costa Blanca, Espaņa
|
#1880
|
i see wrong filenames for both blocks and unwanted whitespace line after first block
Tags |
patchmanager, sailfish os |
|
The question about the notifications hiding the status bar is still open!