Hello community,

here is the log from the commit of package flatpak-builder for openSUSE:Factory 
checked in at 2019-10-28 16:58:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/flatpak-builder (Old)
 and      /work/SRC/openSUSE:Factory/.flatpak-builder.new.2990 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "flatpak-builder"

Mon Oct 28 16:58:09 2019 rev:13 rq:742524 version:1.0.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/flatpak-builder/flatpak-builder.changes  
2019-09-13 15:03:40.377277724 +0200
+++ 
/work/SRC/openSUSE:Factory/.flatpak-builder.new.2990/flatpak-builder.changes    
    2019-10-28 16:59:55.637726205 +0100
@@ -1,0 +2,12 @@
+Mon Oct 21 19:16:55 UTC 2019 - Bjørn Lie <bjorn....@gmail.com>
+
+- Update to version 1.0.9:
+  + More detailed commandline output with --verbose enabled.
+  + Support for including yaml module snippets.
+  + Support the CCACHE_DIR environment variable.
+  + New option disable-submodules for git sources.
+  + New commandline option --show-manifest.
+  + Multiple modules with the same name in the same manifest is now
+    supported.
+
+-------------------------------------------------------------------

Old:
----
  flatpak-builder-1.0.8.tar.xz

New:
----
  flatpak-builder-1.0.9.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ flatpak-builder.spec ++++++
--- /var/tmp/diff_new_pack.2RYgqI/_old  2019-10-28 16:59:56.001726642 +0100
+++ /var/tmp/diff_new_pack.2RYgqI/_new  2019-10-28 16:59:56.005726646 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           flatpak-builder
-Version:        1.0.8
+Version:        1.0.9
 Release:        0
 Summary:        Tool to build flatpaks from source
 License:        LGPL-2.1-or-later

++++++ flatpak-builder-1.0.8.tar.xz -> flatpak-builder-1.0.9.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flatpak-builder-1.0.8/NEWS 
new/flatpak-builder-1.0.9/NEWS
--- old/flatpak-builder-1.0.8/NEWS      2019-06-26 12:43:54.000000000 +0200
+++ new/flatpak-builder-1.0.9/NEWS      2019-09-13 15:49:37.000000000 +0200
@@ -1,3 +1,14 @@
+Changes in 1.0.9
+================
+
+ * More detailed commandline output with --verbose enabled
+ * Support for including yaml module snippets
+ * Support the CCACHE_DIR environment variable
+ * New option disable-submodules for git sources
+ * New commandline option --show-manifest
+ * Multiple modules with the same name in the same manifest is
+   now supported.
+
 Changes in 1.0.8
 ================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flatpak-builder-1.0.8/configure 
new/flatpak-builder-1.0.9/configure
--- old/flatpak-builder-1.0.8/configure 2019-06-26 12:44:53.000000000 +0200
+++ new/flatpak-builder-1.0.9/configure 2019-09-13 15:50:42.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for flatpak-builder 1.0.8.
+# Generated by GNU Autoconf 2.69 for flatpak-builder 1.0.9.
 #
 # Report bugs to <https://github.com/flatpak/flatpak-builder/issues>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='flatpak-builder'
 PACKAGE_TARNAME='flatpak-builder'
-PACKAGE_VERSION='1.0.8'
-PACKAGE_STRING='flatpak-builder 1.0.8'
+PACKAGE_VERSION='1.0.9'
+PACKAGE_STRING='flatpak-builder 1.0.9'
 PACKAGE_BUGREPORT='https://github.com/flatpak/flatpak-builder/issues'
 PACKAGE_URL='http://flatpak.org/'
 
@@ -1394,7 +1394,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures flatpak-builder 1.0.8 to adapt to many kinds of 
systems.
+\`configure' configures flatpak-builder 1.0.9 to adapt to many kinds of 
systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1464,7 +1464,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of flatpak-builder 1.0.8:";;
+     short | recursive ) echo "Configuration of flatpak-builder 1.0.9:";;
    esac
   cat <<\_ACEOF
 
@@ -1615,7 +1615,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-flatpak-builder configure 1.0.8
+flatpak-builder configure 1.0.9
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2030,7 +2030,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by flatpak-builder $as_me 1.0.8, which was
+It was created by flatpak-builder $as_me 1.0.9, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -13249,7 +13249,7 @@
 
 # Define the identity of the package.
  PACKAGE='flatpak-builder'
- VERSION='1.0.8'
+ VERSION='1.0.9'
 
 
 # Some tools Automake needs.
@@ -16935,7 +16935,7 @@
   fi
 
 
-FLATPAK_BUILDER_VERSION=1.0.8
+FLATPAK_BUILDER_VERSION=1.0.9
 
 
 ac_config_files="$ac_config_files Makefile doc/Makefile 
doc/flatpak-builder-docs.xml"
@@ -17494,7 +17494,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by flatpak-builder $as_me 1.0.8, which was
+This file was extended by flatpak-builder $as_me 1.0.9, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17561,7 +17561,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-flatpak-builder config.status 1.0.8
+flatpak-builder config.status 1.0.9
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flatpak-builder-1.0.8/configure.ac 
new/flatpak-builder-1.0.9/configure.ac
--- old/flatpak-builder-1.0.8/configure.ac      2019-06-26 12:44:03.000000000 
+0200
+++ new/flatpak-builder-1.0.9/configure.ac      2019-09-13 15:46:44.000000000 
+0200
@@ -15,7 +15,7 @@
 
 m4_define([flatpak_builder_major_version], [1])
 m4_define([flatpak_builder_minor_version], [0])
-m4_define([flatpak_builder_micro_version], [8])
+m4_define([flatpak_builder_micro_version], [9])
 m4_define([flatpak_builder_version],
           
[flatpak_builder_major_version.flatpak_builder_minor_version.flatpak_builder_micro_version])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flatpak-builder-1.0.8/doc/flatpak-builder.xml 
new/flatpak-builder-1.0.9/doc/flatpak-builder.xml
--- old/flatpak-builder-1.0.8/doc/flatpak-builder.xml   2019-06-26 
12:42:09.000000000 +0200
+++ new/flatpak-builder-1.0.9/doc/flatpak-builder.xml   2019-09-13 
15:08:05.000000000 +0200
@@ -49,6 +49,12 @@
                 <arg choice="opt" rep="repeat">OPTION</arg>
                 <arg choice="plain">MANIFEST</arg>
             </cmdsynopsis>
+            <cmdsynopsis>
+                <command>flatpak-builder</command>
+                <arg choice="plain">--show-manifest</arg>
+                <arg choice="opt" rep="repeat">OPTION</arg>
+                <arg choice="plain">MANIFEST</arg>
+            </cmdsynopsis>
     </refsynopsisdiv>
 
     <refsect1>
@@ -215,7 +221,7 @@
                 <listitem><para>
                   Run a command in a sandbox based on the build dir. This 
starts flatpak build, with some extra
                   arguments to give the same environment as the build, and the 
same permissions the final app
-                  will have. The command to run must be the last argument 
passed to
+                  will have (except filesystem permissions). The command to 
run must be the last argument passed to
                   flatpak-builder, after the directory and the manifest.
                   </para>
 
@@ -254,6 +260,23 @@
             </varlistentry>
 
             <varlistentry>
+                <term><option>--show-manifest</option></term>
+
+                <listitem><para>
+                  Loads the manifest, including any included files and prints 
it in a canonical json format.
+                  This is useful for tools that want to handle manifest files 
to avoid having to support both
+                  yaml and json, as well as some non-standard json handling 
that is supported (for example
+                  comments and multiline strings).
+                  </para>
+
+                  <para>
+                  Only the <option>--verbose</option> option can be combined
+                  with this option.
+                  </para>
+                </listitem>
+            </varlistentry>
+
+            <varlistentry>
                 <term><option>--download-only</option></term>
 
                 <listitem><para>
@@ -344,7 +367,8 @@
                 <term><option>--ccache</option></term>
 
                 <listitem><para>
-                     Enable use of ccache in the build (needs ccache in the 
sdk)
+                     Enable use of ccache in the build (needs ccache in the 
sdk). The default ccache folder can be
+                     overridden by setting the environment variable CCACHE_DIR.
                 </para></listitem>
             </varlistentry>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flatpak-builder-1.0.8/doc/flatpak-manifest.xml 
new/flatpak-builder-1.0.9/doc/flatpak-manifest.xml
--- old/flatpak-builder-1.0.8/doc/flatpak-manifest.xml  2019-06-26 
12:42:09.000000000 +0200
+++ new/flatpak-builder-1.0.9/doc/flatpak-manifest.xml  2019-09-13 
15:08:05.000000000 +0200
@@ -710,6 +710,10 @@
                         <term><option>disable-shallow-clone</option> 
(boolean)</term>
                         <listitem><para>Don't optimize by making a shallow 
clone when downloading the git repo.</para></listitem>
                     </varlistentry>
+                    <varlistentry>
+                        <term><option>disable-submodules</option> 
(boolean)</term>
+                        <listitem><para>Don't checkout the git submodules when 
cloning the repository.</para></listitem>
+                    </varlistentry>
                 </variablelist>
             </refsect3>
             <refsect3>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flatpak-builder-1.0.8/src/builder-context.c 
new/flatpak-builder-1.0.9/src/builder-context.c
--- old/flatpak-builder-1.0.8/src/builder-context.c     2019-01-31 
17:32:19.000000000 +0100
+++ new/flatpak-builder-1.0.9/src/builder-context.c     2019-09-13 
15:08:05.000000000 +0200
@@ -202,7 +202,18 @@
   self->build_dir = g_file_get_child (self->state_dir, "build");
   self->cache_dir = g_file_get_child (self->state_dir, "cache");
   self->checksums_dir = g_file_get_child (self->state_dir, "checksums");
-  self->ccache_dir = g_file_get_child (self->state_dir, "ccache");
+
+  // Check, if CCACHE_DIR is set in environment and use it, instead of subdir 
of state_dir
+  const char * env_ccache_dir = g_getenv ("CCACHE_DIR");
+  if (env_ccache_dir && g_path_is_absolute(env_ccache_dir))
+    {
+      g_debug ("Using CCACHE_DIR '%s'", env_ccache_dir);
+      self->ccache_dir = g_file_new_for_path (env_ccache_dir);
+    }
+    else
+    {
+      self->ccache_dir = g_file_get_child(self->state_dir, "ccache");
+    }
 }
 
 static void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flatpak-builder-1.0.8/src/builder-main.c 
new/flatpak-builder-1.0.9/src/builder-main.c
--- old/flatpak-builder-1.0.8/src/builder-main.c        2019-06-26 
12:42:09.000000000 +0200
+++ new/flatpak-builder-1.0.9/src/builder-main.c        2019-09-13 
15:08:05.000000000 +0200
@@ -47,6 +47,7 @@
 static gboolean opt_finish_only;
 static gboolean opt_export_only;
 static gboolean opt_show_deps;
+static gboolean opt_show_manifest;
 static gboolean opt_disable_download;
 static gboolean opt_disable_updates;
 static gboolean opt_ccache;
@@ -109,6 +110,7 @@
   { "export-only", 0, 0, G_OPTION_ARG_NONE, &opt_export_only, "Only run export 
phase", NULL },
   { "allow-missing-runtimes", 0, 0, G_OPTION_ARG_NONE, 
&opt_allow_missing_runtimes, "Don't fail if runtime and sdk missing", NULL },
   { "show-deps", 0, 0, G_OPTION_ARG_NONE, &opt_show_deps, "List the 
dependencies of the json file (see --show-deps --help)", NULL },
+  { "show-manifest", 0, 0, G_OPTION_ARG_NONE, &opt_show_manifest, "Print out 
the manifest file in standard json format (see --show-manifest --help)", NULL },
   { "require-changes", 0, 0, G_OPTION_ARG_NONE, &opt_require_changes, "Don't 
create app dir or export if no changes", NULL },
   { "keep-build-dirs", 0, 0, G_OPTION_ARG_NONE, &opt_keep_build_dirs, "Don't 
remove build directories after install", NULL },
   { "delete-build-dirs", 0, 0, G_OPTION_ARG_NONE, &opt_delete_build_dirs, 
"Always remove build directories, even after build failure", NULL },
@@ -152,7 +154,13 @@
 
 static GOptionEntry show_deps_entries[] = {
   { "verbose", 'v', 0, G_OPTION_ARG_NONE, &opt_verbose, "Print debug 
information during command processing", NULL },
-  { "show-deps", 0, 0, G_OPTION_ARG_NONE, &opt_show_deps, "List the 
dependencies of the json file (see --show-deps --help)", NULL },
+  { "show-deps", 0, 0, G_OPTION_ARG_NONE, &opt_show_deps, "List the 
dependencies of the json file", NULL },
+  { NULL }
+};
+
+static GOptionEntry show_manifest_entries[] = {
+  { "verbose", 'v', 0, G_OPTION_ARG_NONE, &opt_verbose, "Print debug 
information during command processing", NULL },
+  { "show-manifest", 0, 0, G_OPTION_ARG_NONE, &opt_show_manifest, "Print out 
the manifest file in standard json format", NULL },
   { NULL }
 };
 
@@ -198,7 +206,6 @@
   int i;
 
   g_autoptr(GPtrArray) args = NULL;
-  g_autoptr(GSubprocess) subp = NULL;
 
   args = g_ptr_array_new_with_free_func (g_free);
   g_ptr_array_add (args, g_strdup ("flatpak"));
@@ -244,16 +251,8 @@
 
   g_ptr_array_add (args, NULL);
 
-  subp =
-    g_subprocess_newv ((const gchar * const *) args->pdata,
-                       G_SUBPROCESS_FLAGS_NONE,
-                       error);
-
-  if (subp == NULL ||
-      !g_subprocess_wait_check (subp, NULL, error))
-    return FALSE;
-
-  return TRUE;
+  return flatpak_spawnv (NULL, NULL, G_SUBPROCESS_FLAGS_NONE, error,
+                         (const gchar * const *) args->pdata);
 }
 
 static gboolean
@@ -266,7 +265,6 @@
   g_autofree char *ref = NULL;
 
   g_autoptr(GPtrArray) args = NULL;
-  g_autoptr(GSubprocess) subp = NULL;
 
   args = g_ptr_array_new_with_free_func (g_free);
   g_ptr_array_add (args, g_strdup ("flatpak"));
@@ -292,16 +290,8 @@
 
   g_ptr_array_add (args, NULL);
 
-  subp =
-    g_subprocess_newv ((const gchar * const *) args->pdata,
-                       G_SUBPROCESS_FLAGS_NONE,
-                       error);
-
-  if (subp == NULL ||
-      !g_subprocess_wait_check (subp, NULL, error))
-    return FALSE;
-
-  return TRUE;
+  return flatpak_spawnv (NULL, NULL, G_SUBPROCESS_FLAGS_NONE, error,
+                         (const gchar * const *) args->pdata);
 }
 
 static gboolean
@@ -397,6 +387,7 @@
   g_autofree char **orig_argv = NULL;
   gboolean is_run = FALSE;
   gboolean is_show_deps = FALSE;
+  gboolean is_show_manifest = FALSE;
   gboolean app_dir_is_empty = FALSE;
   gboolean prune_unused_stages = FALSE;
   g_autoptr(FlatpakContext) arg_context = NULL;
@@ -444,6 +435,8 @@
         is_run = TRUE;
       if (strcmp (argv[i], "--show-deps") == 0)
         is_show_deps = TRUE;
+      if (strcmp (argv[i], "--show-manifest") == 0)
+        is_show_manifest = TRUE;
     }
 
   if (is_run)
@@ -461,6 +454,11 @@
       context = g_option_context_new ("MANIFEST - Show manifest dependencies");
       g_option_context_add_main_entries (context, show_deps_entries, NULL);
     }
+  else if (is_show_manifest)
+    {
+      context = g_option_context_new ("MANIFEST - Show manifest");
+      g_option_context_add_main_entries (context, show_manifest_entries, NULL);
+    }
   else
     {
       context = g_option_context_new ("DIRECTORY MANIFEST - Build manifest");
@@ -484,7 +482,7 @@
 
   argnr = 1;
 
-  if (!is_show_deps)
+  if (!is_show_deps && !is_show_manifest)
     {
       if (argc == argnr)
         return usage (context, "DIRECTORY must be specified");
@@ -592,7 +590,7 @@
       if (opt_disable_updates)
         {
           mirror_flags |= FLATPAK_GIT_MIRROR_FLAGS_UPDATE;
-       }
+        }
 
       if (!builder_git_mirror_repo (opt_from_git,
                                     NULL,
@@ -691,6 +689,13 @@
       return 0;
     }
 
+  if (is_show_manifest)
+    {
+      g_autofree char *json = builder_manifest_serialize (manifest);
+      g_print ("%s\n", json);
+      return 0;
+    }
+
   if (opt_install_deps_from != NULL)
     {
       if (!builder_manifest_install_deps (manifest, build_context, 
opt_install_deps_from, opt_user, opt_installation,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flatpak-builder-1.0.8/src/builder-manifest.c 
new/flatpak-builder-1.0.9/src/builder-manifest.c
--- old/flatpak-builder-1.0.8/src/builder-manifest.c    2019-06-26 
12:42:09.000000000 +0200
+++ new/flatpak-builder-1.0.9/src/builder-manifest.c    2019-09-13 
15:46:32.000000000 +0200
@@ -226,6 +226,9 @@
     {
       BuilderModule *m = l->data;
       GList *submodules = NULL;
+      g_autofree char *new_name = NULL;
+      int new_name_counter;
+      const char *orig_name;
       const char *name;
 
       if (!builder_module_is_enabled (m, context))
@@ -237,7 +240,6 @@
       *expanded = g_list_concat (*expanded, submodules);
 
       name = builder_module_get_name (m);
-
       if (name == NULL)
         {
           /* FIXME: We'd like to report *something* for the user
@@ -247,13 +249,22 @@
                        "Module has no 'name' attribute set");
           return FALSE;
         }
+      orig_name = name;
 
-      if (g_hash_table_lookup (names, name) != NULL)
+      /* Duplicated name happen sometimes, like e.g. when including snippets 
out of your control.
+       * It is not a huge problem for building, but we need unique names for 
e.g the cache, so
+       * uniquify on collision */
+      new_name_counter = 2;
+      while (g_hash_table_lookup (names, name) != NULL)
         {
-          g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                       "Duplicate modules named '%s'", name);
-          return FALSE;
+          g_free (new_name);
+          new_name = g_strdup_printf ("%s-%d", orig_name, new_name_counter++);
+          name = new_name;
         }
+
+      if (name != orig_name)
+        builder_module_set_name (m, name);
+
       g_hash_table_insert (names, (char *)name, (char *)name);
       *expanded = g_list_append (*expanded, m);
     }
@@ -1289,7 +1300,7 @@
   serializable_iface->get_property = builder_serializable_get_property;
 }
 
-static char *
+char *
 builder_manifest_serialize (BuilderManifest *self)
 {
   JsonNode *node;
@@ -1638,9 +1649,7 @@
 {
   GFile *app_dir = builder_context_get_app_dir (context);
 
-  g_autoptr(GSubprocess) subp = NULL;
   g_autoptr(GPtrArray) args = NULL;
-  g_autofree char *commandline = NULL;
   GList *l;
   int i;
 
@@ -1723,16 +1732,8 @@
   g_ptr_array_add (args, g_strdup (builder_manifest_get_runtime_version 
(self)));
   g_ptr_array_add (args, NULL);
 
-  commandline = flatpak_quote_argv ((const char **) args->pdata);
-  g_debug ("Running '%s'", commandline);
-
-  subp =
-    g_subprocess_newv ((const gchar * const *) args->pdata,
-                       G_SUBPROCESS_FLAGS_NONE,
-                       error);
-
-  if (subp == NULL ||
-      !g_subprocess_wait_check (subp, NULL, error))
+  if (!flatpak_spawnv (NULL, NULL, G_SUBPROCESS_FLAGS_NONE, error,
+                       (const gchar * const *) args->pdata))
     return FALSE;
 
   if (self->build_runtime && self->separate_locales)
@@ -2760,10 +2761,8 @@
   g_autoptr(GFile) sources_dir = NULL;
   g_autoptr(GFile) locale_parent_dir = NULL;
   g_autofree char *json = NULL;
-  g_autofree char *commandline = NULL;
   g_autoptr(GPtrArray) args = NULL;
   g_autoptr(GPtrArray) inherit_extensions = NULL;
-  g_autoptr(GSubprocess) subp = NULL;
   int i;
   GList *l;
 
@@ -2956,16 +2955,8 @@
       g_ptr_array_add (args, g_file_get_path (app_dir));
       g_ptr_array_add (args, NULL);
 
-      commandline = flatpak_quote_argv ((const char **) args->pdata);
-      g_debug ("Running '%s'", commandline);
-
-      subp =
-        g_subprocess_newv ((const gchar * const *) args->pdata,
-                           G_SUBPROCESS_FLAGS_NONE,
-                           error);
-
-      if (subp == NULL ||
-          !g_subprocess_wait_check (subp, NULL, error))
+      if (!flatpak_spawnv (NULL, NULL, G_SUBPROCESS_FLAGS_NONE, error,
+                           (const gchar * const *) args->pdata))
         return FALSE;
 
       json = builder_manifest_serialize (self);
@@ -3178,9 +3169,7 @@
     {
       GFile *app_dir = NULL;
       g_autoptr(GFile) platform_dir = NULL;
-      g_autoptr(GSubprocess) subp = NULL;
       g_autoptr(GPtrArray) args = NULL;
-      g_autofree char *commandline = NULL;
       int i;
 
       g_print ("Creating platform based on %s\n", self->runtime);
@@ -3216,16 +3205,8 @@
 
       g_ptr_array_add (args, NULL);
 
-      commandline = flatpak_quote_argv ((const char **) args->pdata);
-      g_debug ("Running '%s'", commandline);
-
-      subp =
-        g_subprocess_newv ((const gchar * const *) args->pdata,
-                           G_SUBPROCESS_FLAGS_NONE,
-                           error);
-
-      if (subp == NULL ||
-          !g_subprocess_wait_check (subp, NULL, error))
+      if (!flatpak_spawnv (NULL, NULL, G_SUBPROCESS_FLAGS_NONE, error,
+                           (const gchar * const *) args->pdata))
         return FALSE;
 
       if (self->separate_locales)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flatpak-builder-1.0.8/src/builder-manifest.h 
new/flatpak-builder-1.0.9/src/builder-manifest.h
--- old/flatpak-builder-1.0.8/src/builder-manifest.h    2019-06-26 
12:42:09.000000000 +0200
+++ new/flatpak-builder-1.0.9/src/builder-manifest.h    2019-09-13 
15:08:05.000000000 +0200
@@ -134,6 +134,7 @@
                                                   BuilderCache    *cache,
                                                   BuilderContext  *context,
                                                   GError         **error);
+char *          builder_manifest_serialize       (BuilderManifest *self);
 
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (BuilderManifest, g_object_unref)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flatpak-builder-1.0.8/src/builder-module.c 
new/flatpak-builder-1.0.9/src/builder-module.c
--- old/flatpak-builder-1.0.8/src/builder-module.c      2019-06-26 
12:42:09.000000000 +0200
+++ new/flatpak-builder-1.0.9/src/builder-module.c      2019-09-13 
15:46:32.000000000 +0200
@@ -749,7 +749,7 @@
     }
 
   builder_manifest_set_demarshal_base_dir (sources_file_dir);
-  sources_root = json_from_string (sources_json, &error);
+  sources_root = builder_json_node_from_data (sources_path, sources_json, 
&error);
   if (sources_root == NULL)
     {
       g_printerr ("Error parsing %s: %s\n", sources_relpath, error->message);
@@ -936,6 +936,14 @@
   return self->name;
 }
 
+void
+builder_module_set_name (BuilderModule *self,
+                         const char *name)
+{
+  g_free (self->name);
+  self->name = g_strdup (name);
+}
+
 gboolean
 builder_module_is_enabled (BuilderModule *self,
                            BuilderContext *context)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flatpak-builder-1.0.8/src/builder-module.h 
new/flatpak-builder-1.0.9/src/builder-module.h
--- old/flatpak-builder-1.0.8/src/builder-module.h      2019-06-26 
12:42:09.000000000 +0200
+++ new/flatpak-builder-1.0.9/src/builder-module.h      2019-09-13 
15:46:32.000000000 +0200
@@ -40,6 +40,8 @@
 GType builder_module_get_type (void);
 
 const char * builder_module_get_name (BuilderModule *self);
+void         builder_module_set_name (BuilderModule *self,
+                                      const char *name);
 gboolean     builder_module_is_enabled (BuilderModule *self,
                                         BuilderContext *context);
 gboolean     builder_module_get_disabled (BuilderModule *self);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flatpak-builder-1.0.8/src/builder-source-git.c 
new/flatpak-builder-1.0.9/src/builder-source-git.c
--- old/flatpak-builder-1.0.8/src/builder-source-git.c  2019-01-31 
17:32:15.000000000 +0100
+++ new/flatpak-builder-1.0.9/src/builder-source-git.c  2019-09-13 
15:08:05.000000000 +0200
@@ -46,6 +46,7 @@
   char         *orig_ref;
   gboolean      disable_fsckobjects;
   gboolean      disable_shallow_clone;
+  gboolean      disable_submodules;
 };
 
 typedef struct
@@ -64,6 +65,7 @@
   PROP_COMMIT,
   PROP_DISABLE_FSCKOBJECTS,
   PROP_DISABLE_SHALLOW_CLONE,
+  PROP_DISABLE_SUBMODULES,
   LAST_PROP
 };
 
@@ -120,6 +122,10 @@
       g_value_set_boolean (value, self->disable_shallow_clone);
       break;
 
+    case PROP_DISABLE_SUBMODULES:
+      g_value_set_boolean (value, self->disable_submodules);
+      break;
+
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
     }
@@ -168,6 +174,10 @@
       self->disable_shallow_clone = g_value_get_boolean (value);
       break;
 
+    case PROP_DISABLE_SUBMODULES:
+      self->disable_submodules = g_value_get_boolean (value);
+      break;
+
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
     }
@@ -226,7 +236,7 @@
 {
   BuilderSourceGit *self = BUILDER_SOURCE_GIT (source);
   g_autofree char *location = NULL;
-  FlatpakGitMirrorFlags flags;
+  FlatpakGitMirrorFlags flags = 0;
 
   location = get_url_or_path (self, context, error);
   if (location == NULL)
@@ -235,7 +245,8 @@
   if (self->tag != NULL && self->branch != NULL)
     return flatpak_fail (error, "Both tag (%s) and branch (%s) specified for 
git source", self->tag, self->branch);
 
-  flags = FLATPAK_GIT_MIRROR_FLAGS_MIRROR_SUBMODULES;
+  if (!self->disable_submodules)
+    flags |= FLATPAK_GIT_MIRROR_FLAGS_MIRROR_SUBMODULES;
   if (update_vcs)
     flags |= FLATPAK_GIT_MIRROR_FLAGS_UPDATE;
   if (self->disable_fsckobjects)
@@ -444,6 +455,14 @@
                                                          "",
                                                          "",
                                                          FALSE,
+                                                         G_PARAM_READWRITE));
+
+  g_object_class_install_property (object_class,
+                                   PROP_DISABLE_SUBMODULES,
+                                   g_param_spec_boolean ("disable-submodules",
+                                                         "",
+                                                         "",
+                                                         FALSE,
                                                          G_PARAM_READWRITE));
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flatpak-builder-1.0.8/src/builder-utils.c 
new/flatpak-builder-1.0.9/src/builder-utils.c
--- old/flatpak-builder-1.0.8/src/builder-utils.c       2019-06-26 
12:42:09.000000000 +0200
+++ new/flatpak-builder-1.0.9/src/builder-utils.c       2019-09-13 
15:08:05.000000000 +0200
@@ -423,7 +423,8 @@
                   json_node_init_int (json, num);
                   break;
                 }
-              else if (*endptr == '.')
+              // Make sure that N.N, N., and .N (where N is a digit) are 
picked up as numbers.
+              else if (*endptr == '.' && (endptr != scalar || endptr[1] != 
'\0'))
                 {
                   g_ascii_strtoll (endptr + 1, &endptr, 10);
                   if (*endptr == '\0')
@@ -509,22 +510,28 @@
 
 #endif  // FLATPAK_BUILDER_ENABLE_YAML
 
+JsonNode *
+builder_json_node_from_data (const char *relpath,
+                             const char *contents,
+                             GError    **error)
+{
+  if (g_str_has_suffix (relpath, ".yaml") || g_str_has_suffix (relpath, 
".yml"))
+    return parse_yaml_to_json (contents, error);
+  else
+    return json_from_string (contents, error);
+}
+
 GObject *
 builder_gobject_from_data (GType       gtype,
                            const char *relpath,
                            const char *contents,
                            GError    **error)
 {
-  if (g_str_has_suffix (relpath, ".yaml") || g_str_has_suffix (relpath, 
".yml"))
-    {
-      g_autoptr(JsonNode) json = parse_yaml_to_json (contents, error);
-      if (json != NULL)
-        return json_gobject_deserialize (gtype, json);
-      else
-        return NULL;
-    }
+  g_autoptr(JsonNode) json = builder_json_node_from_data (relpath, contents, 
error);
+  if (json != NULL)
+    return json_gobject_deserialize (gtype, json);
   else
-    return json_gobject_from_data (gtype, contents, -1, error);
+    return NULL;
 }
 
 /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flatpak-builder-1.0.8/src/builder-utils.h 
new/flatpak-builder-1.0.9/src/builder-utils.h
--- old/flatpak-builder-1.0.8/src/builder-utils.h       2019-06-26 
12:42:09.000000000 +0200
+++ new/flatpak-builder-1.0.9/src/builder-utils.h       2019-09-13 
15:08:05.000000000 +0200
@@ -68,6 +68,10 @@
 GQuark builder_yaml_parse_error_quark (void);
 #define BUILDER_YAML_PARSE_ERROR (builder_yaml_parse_error_quark ())
 
+JsonNode * builder_json_node_from_data (const char *relpath,
+                                        const char *contents,
+                                        GError    **error);
+
 GObject * builder_gobject_from_data (GType       gtype,
                                      const char *relpath,
                                      const char *contents,


Reply via email to