-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added unapplyall patch and dbus method to daemon
- Loading branch information
Showing
8 changed files
with
111 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "Unapply all patches on Upgrade", | ||
"description": "Patch for unapplying all patches when upgrading SailfishOS version. Do not unapply this patch manually, unless you want to completely uninstall Patchmanager.", | ||
"category": "settings", | ||
"infos": { | ||
"maintainer": "coderus" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
diff --git a/usr/share/jolla-settings/pages/sailfishos/mainpage.qml b/usr/share/jolla-settings/pages/sailfishos/mainpage.qml | ||
index ca5c814..c330236 100644 | ||
--- a/usr/share/jolla-settings/pages/sailfishos/mainpage.qml | ||
+++ b/usr/share/jolla-settings/pages/sailfishos/mainpage.qml | ||
@@ -127,6 +127,25 @@ Page { | ||
iface: "org.nemomobile.lipstick" | ||
} | ||
|
||
+ DBusInterface { | ||
+ id: patchmanagerBus | ||
+ busType: DBusInterface.SystemBus | ||
+ destination: "org.SfietKonstantin.patchmanager" | ||
+ path: "/org/SfietKonstantin/patchmanager" | ||
+ iface: "org.SfietKonstantin.patchmanager" | ||
+ } | ||
+ | ||
+ function unapplyAllCallback(arg) { | ||
+ if (arg) { | ||
+ // Let the UI smoothly fade out first before doing anything scary | ||
+ shutdownBus.call("setShutdownMode", ["upgrade"]) | ||
+ // Clear the cache and the system update notification | ||
+ storeIf.clearOsUpdateCheckCache() | ||
+ } else { | ||
+ patchmanagerBus.call("applyPatch", ["sailfishos-patchmanager-unapplyall"]) | ||
+ } | ||
+ } | ||
+ | ||
SilicaFlickable { | ||
anchors.fill: parent | ||
contentHeight: content.height | ||
@@ -250,10 +269,7 @@ Page { | ||
} | ||
} | ||
} else if (storeIf.mayInstall) { | ||
- // Let the UI smoothly fade out first before doing anything scary | ||
- shutdownBus.call("setShutdownMode", ["upgrade"]) | ||
- // Clear the cache and the system update notification | ||
- storeIf.clearOsUpdateCheckCache() | ||
+ patchmanagerBus.call("unapplyAllPatches", [], unapplyAllCallback) | ||
} | ||
} | ||
} | ||
index ca5c814..4fd6f01 100644 | ||
--- a/usr/share/jolla-settings/pages/sailfishos/mainpage.qml | ||
+++ b/usr/share/jolla-settings/pages/sailfishos/mainpage.qml | ||
@@ -127,6 +127,23 @@ Page { | ||
iface: "org.nemomobile.lipstick" | ||
} | ||
|
||
+ DBusInterface { | ||
+ id: patchmanagerBus | ||
+ busType: DBusInterface.SystemBus | ||
+ destination: "org.SfietKonstantin.patchmanager" | ||
+ path: "/org/SfietKonstantin/patchmanager" | ||
+ iface: "org.SfietKonstantin.patchmanager" | ||
+ } | ||
+ | ||
+ function unapplyAllCallback(arg) { | ||
+ if (arg) { | ||
+ // Let the UI smoothly fade out first before doing anything scary | ||
+ shutdownBus.call("setShutdownMode", ["upgrade"]) | ||
+ // Clear the cache and the system update notification | ||
+ storeIf.clearOsUpdateCheckCache() | ||
+ } | ||
+ } | ||
+ | ||
SilicaFlickable { | ||
anchors.fill: parent | ||
contentHeight: content.height | ||
@@ -250,10 +267,7 @@ Page { | ||
} | ||
} | ||
} else if (storeIf.mayInstall) { | ||
- // Let the UI smoothly fade out first before doing anything scary | ||
- shutdownBus.call("setShutdownMode", ["upgrade"]) | ||
- // Clear the cache and the system update notification | ||
- storeIf.clearOsUpdateCheckCache() | ||
+ patchmanagerBus.call("unapplyAllPatches", [], unapplyAllCallback) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters