[gnome-software/wip/kalev/rpm-ostree-layered-package-install: 5/7] rpm-ostree: trivial: Avoid changing installing/removing state to installed



commit 4580d92302089189244b58a7d113eb07acfe7655
Author: Kalev Lember <klember redhat com>
Date:   Sat Feb 23 17:57:29 2019 +0100

    rpm-ostree: trivial: Avoid changing installing/removing state to installed

 plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
index 142ba80c..873876f7 100644
--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
@@ -947,7 +947,8 @@ resolve_packages_app (GsPlugin *plugin,
                RpmOstreePackage *pkg = g_ptr_array_index (pkglist, i);
                if (g_strcmp0 (rpm_ostree_package_get_name (pkg), gs_app_get_source_default (app)) == 0) {
                        gs_app_set_version (app, rpm_ostree_package_get_evr (pkg));
-                       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+                       if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
+                               gs_app_set_state (app, AS_APP_STATE_INSTALLED);
                        if (g_strv_contains ((const gchar * const *) layered_packages,
                                             rpm_ostree_package_get_name (pkg))) {
                                /* layered packages can always be removed */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]