[gnome-builder] autotools: Check for a dirty config before doing an install



commit 8433c0ddbd1e630ee4d0bbf32957fa20a02d6cbf
Author: Matthew Leeds <mleeds redhat com>
Date:   Fri Nov 18 13:01:55 2016 -0600

    autotools: Check for a dirty config before doing an install
    
    IdeConfiguration has a "dirty" property that we use to keep track of
    whether it has changed since the last build so we can, for example, run
    the autogen.sh step for an autotools build. But we were only checking if
    the configuration is dirty in ide_autotools_builder_build_async but not
    ide_autotools_builder_install_async (which also does a build). This
    commit fixes that so after the changing the runtime, the Run button should
    work.

 plugins/autotools/ide-autotools-builder.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/plugins/autotools/ide-autotools-builder.c b/plugins/autotools/ide-autotools-builder.c
index f9d4aa0..e340311 100644
--- a/plugins/autotools/ide-autotools-builder.c
+++ b/plugins/autotools/ide-autotools-builder.c
@@ -225,10 +225,15 @@ ide_autotools_builder_install_async (IdeBuilder           *builder,
   g_autoptr(GFile) directory = NULL;
   IdeConfiguration *configuration;
   IdeContext *context;
+  IdeBuilderBuildFlags flags;
 
   g_return_if_fail (IDE_IS_AUTOTOOLS_BUILDER (builder));
   g_return_if_fail (IDE_IS_AUTOTOOLS_BUILDER (self));
 
+  flags = IDE_BUILDER_BUILD_FLAGS_NONE;
+  if (ide_autotools_builder_get_needs_bootstrap (self))
+    flags |= IDE_BUILDER_BUILD_FLAGS_FORCE_BOOTSTRAP;
+
   task = g_task_new (self, cancellable, callback, user_data);
 
   context = ide_object_get_context (IDE_OBJECT (builder));
@@ -249,7 +254,7 @@ ide_autotools_builder_install_async (IdeBuilder           *builder,
     *result = g_object_ref (build_result);
 
   ide_autotools_build_task_execute_with_postbuild (build_result,
-                                                   IDE_BUILDER_BUILD_FLAGS_NONE,
+                                                   flags,
                                                    cancellable,
                                                    ide_autotools_builder_install_cb,
                                                    g_object_ref (task));


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