[gnome-builder/wip/cosimoc/flatpak-override-config: 2/4] flatpak: don't set app ID from runtime if it's already set



commit 61a04c06a6c216f7604a6add438dd46a34ee9e2b
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sun Dec 18 12:52:29 2016 -0800

    flatpak: don't set app ID from runtime if it's already set
    
    It may already have been set using a buildconfig override.

 plugins/flatpak/gbp-flatpak-runtime.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-runtime.c b/plugins/flatpak/gbp-flatpak-runtime.c
index 82c885a..ff7f6ba 100644
--- a/plugins/flatpak/gbp-flatpak-runtime.c
+++ b/plugins/flatpak/gbp-flatpak-runtime.c
@@ -938,8 +938,12 @@ gbp_flatpak_runtime_prepare_configuration (IdeRuntime       *runtime,
   g_assert (GBP_IS_FLATPAK_RUNTIME (self));
   g_assert (IDE_IS_CONFIGURATION (configuration));
 
-  if (!ide_str_empty0 (self->app_id))
-    ide_configuration_set_app_id (configuration, self->app_id);
+  if (!ide_configuration_get_app_id (configuration))
+    {
+      if (!ide_str_empty0 (self->app_id))
+        ide_configuration_set_app_id (configuration, self->app_id);
+    }
+
   ide_configuration_set_prefix (configuration, "/app");
   ide_configuration_set_internal_string (configuration, "flatpak-repo-name", FLATPAK_REPO_NAME);
 }


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