[gnome-software] rpm-ostree: Don't error out when distro upgrade ref is already deployed
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] rpm-ostree: Don't error out when distro upgrade ref is already deployed
- Date: Fri, 31 Jan 2020 15:13:26 +0000 (UTC)
commit 9e21b3147e487f8d941cbe6f739f01111c50deb5
Author: Kalev Lember <klember redhat com>
Date: Fri Jan 31 14:21:20 2020 +0100
rpm-ostree: Don't error out when distro upgrade ref is already deployed
plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
index 0ceb4d2d..3811f935 100644
--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
@@ -982,7 +982,14 @@ gs_plugin_app_upgrade_trigger (GsPlugin *plugin,
cancellable,
error)) {
gs_rpmostree_error_convert (error);
- return FALSE;
+
+ if (g_strrstr ((*error)->message, "Old and new refs are equal")) {
+ /* don't error out if the correct tree is already deployed */
+ g_debug ("ignoring rpm-ostree error: %s", (*error)->message);
+ g_clear_error (error);
+ } else {
+ return FALSE;
+ }
}
/* success */
@@ -1504,8 +1511,15 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin,
cancellable,
error)) {
gs_rpmostree_error_convert (error);
- gs_app_set_state_recover (app);
- return FALSE;
+
+ if (g_strrstr ((*error)->message, "Old and new refs are equal")) {
+ /* don't error out if the correct tree is already deployed */
+ g_debug ("ignoring rpm-ostree error: %s", (*error)->message);
+ g_clear_error (error);
+ } else {
+ gs_app_set_state_recover (app);
+ return FALSE;
+ }
}
/* state is known */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]