Hello community,

here is the log from the commit of package flatpak-builder for openSUSE:Factory 
checked in at 2019-09-13 15:01:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/flatpak-builder (Old)
 and      /work/SRC/openSUSE:Factory/.flatpak-builder.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "flatpak-builder"

Fri Sep 13 15:01:51 2019 rev:12 rq:730444 version:1.0.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/flatpak-builder/flatpak-builder.changes  
2019-06-01 09:56:19.711184406 +0200
+++ 
/work/SRC/openSUSE:Factory/.flatpak-builder.new.7948/flatpak-builder.changes    
    2019-09-13 15:03:40.377277724 +0200
@@ -1,0 +2,9 @@
+Wed Sep 11 17:17:28 UTC 2019 - Bjørn Lie <bjorn....@gmail.com>
+
+- Update to version 1.0.8:
+  + Support multiple instances of --install-dep-from.
+  + Ensure shallow git mirrors are updated when the git ref
+    changes.
+  + Improved error reporting.
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ flatpak-builder.spec ++++++
--- /var/tmp/diff_new_pack.yvyv0t/_old  2019-09-13 15:03:40.853277622 +0200
+++ /var/tmp/diff_new_pack.yvyv0t/_new  2019-09-13 15:03:40.857277621 +0200
@@ -17,13 +17,14 @@
 
 
 Name:           flatpak-builder
-Version:        1.0.7
+Version:        1.0.8
 Release:        0
 Summary:        Tool to build flatpaks from source
 License:        LGPL-2.1-or-later
 Group:          Development/Tools/Building
 URL:            http://flatpak.org/
-Source:         
https://github.com/flatpak/flatpak-builder/releases/download/%{version}/%{name}-%{version}.tar.xz
+Source0:        
https://github.com/flatpak/flatpak-builder/releases/download/%{version}/%{name}-%{version}.tar.xz
+
 BuildRequires:  docbook-xsl-stylesheets
 BuildRequires:  gettext
 BuildRequires:  gtk-doc

++++++ flatpak-builder-1.0.7.tar.xz -> flatpak-builder-1.0.8.tar.xz ++++++
++++ 3576 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/flatpak-builder-1.0.7/NEWS new/flatpak-builder-1.0.8/NEWS
--- old/flatpak-builder-1.0.7/NEWS      2019-05-10 09:28:17.000000000 +0200
+++ new/flatpak-builder-1.0.8/NEWS      2019-06-26 12:43:54.000000000 +0200
@@ -1,3 +1,10 @@
+Changes in 1.0.8
+================
+
+ * Support multiple instances of --install-dep-from
+ * Ensure shallow git mirrors are updated when the git ref changes
+ * Improved error reporting
+
 Changes in 1.0.7
 ================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/flatpak-builder-1.0.7/configure.ac new/flatpak-builder-1.0.8/configure.ac
--- old/flatpak-builder-1.0.7/configure.ac      2019-05-10 09:26:53.000000000 
+0200
+++ new/flatpak-builder-1.0.8/configure.ac      2019-06-26 12:44:03.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], [7])
+m4_define([flatpak_builder_micro_version], [8])
 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' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/flatpak-builder-1.0.7/src/builder-git.c 
new/flatpak-builder-1.0.8/src/builder-git.c
--- old/flatpak-builder-1.0.7/src/builder-git.c 2019-02-08 11:18:07.000000000 
+0100
+++ new/flatpak-builder-1.0.8/src/builder-git.c 2019-06-26 12:42:09.000000000 
+0200
@@ -531,8 +531,10 @@
       else
         cached_git_dir = g_object_ref (cache_mirror_dir);
 
-      /* If we're not updating, only pull from cache to avoid network i/o */
-      if (!update)
+      /* If the ref already exists (it may not with a shallow mirror
+       * if it has changed) and we're not updating, only pull from
+       * cache to avoid network i/o. */
+      if (already_exists && !update)
         {
           if (cached_git_dir)
             origin = g_file_get_uri (cached_git_dir);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/flatpak-builder-1.0.7/src/builder-main.c 
new/flatpak-builder-1.0.8/src/builder-main.c
--- old/flatpak-builder-1.0.7/src/builder-main.c        2019-02-15 
09:01:30.000000000 +0100
+++ new/flatpak-builder-1.0.8/src/builder-main.c        2019-06-26 
12:42:09.000000000 +0200
@@ -78,7 +78,7 @@
 static char **opt_remove_tags;
 static int opt_jobs;
 static char *opt_mirror_screenshots_url;
-static char *opt_install_deps_from;
+static char **opt_install_deps_from;
 static gboolean opt_install_deps_only;
 static gboolean opt_user;
 static char *opt_installation;
@@ -129,7 +129,7 @@
   { "from-git-branch", 0, 0, G_OPTION_ARG_STRING, &opt_from_git_branch, 
"Branch to use in --from-git", "BRANCH"},
   { "mirror-screenshots-url", 0, 0, G_OPTION_ARG_STRING, 
&opt_mirror_screenshots_url, "Download and rewrite screenshots to match this 
url", "URL"},
   { "install", 0, 0, G_OPTION_ARG_NONE, &opt_install, "Install if build 
succeeds", NULL},
-  { "install-deps-from", 0, 0, G_OPTION_ARG_STRING, &opt_install_deps_from, 
"Install build dependencies from this remote", "REMOTE"},
+  { "install-deps-from", 0, 0, G_OPTION_ARG_STRING_ARRAY, 
&opt_install_deps_from, "Install build dependencies from this remote", 
"REMOTE"},
   { "install-deps-only", 0, 0, G_OPTION_ARG_NONE, &opt_install_deps_only, 
"Stop after installing dependencies"},
   { "user", 0, 0, G_OPTION_ARG_NONE, &opt_user, "Install dependencies in user 
installations", NULL },
   { "system", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &opt_user, "Install 
dependencies in system-wide installations (default)", NULL },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/flatpak-builder-1.0.7/src/builder-manifest.c 
new/flatpak-builder-1.0.8/src/builder-manifest.c
--- old/flatpak-builder-1.0.7/src/builder-manifest.c    2019-05-06 
10:46:06.000000000 +0200
+++ new/flatpak-builder-1.0.8/src/builder-manifest.c    2019-06-26 
12:42:09.000000000 +0200
@@ -3754,9 +3754,77 @@
 }
 
 static gboolean
+builder_manifest_install_single_dep (const char *ref,
+                                    const char *remote,
+                                    gboolean opt_user,
+                                    const char *opt_installation,
+                                    GError **error)
+{
+  g_autoptr(GPtrArray) args = NULL;
+  args = g_ptr_array_new_with_free_func (g_free);
+  g_ptr_array_add (args, g_strdup ("flatpak"));
+  add_installation_args (args, opt_user, opt_installation);
+
+  g_ptr_array_add (args, g_strdup ("install"));
+  g_ptr_array_add (args, g_strdup (remote));
+  
+  g_ptr_array_add (args, g_strdup ("-y"));
+  if (flatpak_version_check (1, 2, 0))
+    g_ptr_array_add (args, g_strdup ("--noninteractive"));
+
+  g_ptr_array_add (args, g_strdup (ref));
+  g_ptr_array_add (args, NULL);
+
+  if (!builder_maybe_host_spawnv (NULL, NULL, 0, error, (const char * const 
*)args->pdata))
+    {
+      g_autofree char *commandline = flatpak_quote_argv ((const char 
**)args->pdata);
+      g_prefix_error (error, "running `%s`: ", commandline);
+      return FALSE;
+    }
+  else
+    {
+      return TRUE;
+    }
+}
+
+
+static gboolean
+builder_manifest_update_single_dep (const char *ref,
+                                    gboolean opt_user,
+                                    const char *opt_installation,
+                                    GError **error)
+{
+  g_autoptr(GPtrArray) args = NULL;
+  args = g_ptr_array_new_with_free_func (g_free);
+  g_ptr_array_add (args, g_strdup ("flatpak"));
+  add_installation_args (args, opt_user, opt_installation);
+
+  g_ptr_array_add (args, g_strdup ("update"));
+  g_ptr_array_add (args, g_strdup ("--subpath="));
+
+  g_ptr_array_add (args, g_strdup ("-y"));
+  if (flatpak_version_check (1, 2, 0))
+    g_ptr_array_add (args, g_strdup ("--noninteractive"));
+
+  g_ptr_array_add (args, g_strdup (ref));
+  g_ptr_array_add (args, NULL);
+
+  if (!builder_maybe_host_spawnv (NULL, NULL, 0, error, (const char * const 
*)args->pdata))
+    {
+      g_autofree char *commandline = flatpak_quote_argv ((const char 
**)args->pdata);
+      g_prefix_error (error, "running `%s`: ", commandline);
+      return FALSE;
+    }
+  else
+    {
+      return TRUE;
+    }
+}
+
+static gboolean
 builder_manifest_install_dep (BuilderManifest *self,
                               BuilderContext  *context,
-                              const char *remote,
+                              char *const *remotes,
                               gboolean opt_user,
                               const char *opt_installation,
                               const char *runtime,
@@ -3766,8 +3834,7 @@
 {
   g_autofree char *ref = NULL;
   g_autofree char *commit = NULL;
-  g_autoptr(GPtrArray) args = NULL;
-  gboolean installed;
+  g_autoptr(GError) first_error = NULL;
 
   if (version == NULL)
     version = builder_manifest_get_runtime_version (self);
@@ -3777,37 +3844,49 @@
                                    builder_context_get_arch (context));
 
   commit = flatpak_info (opt_user, opt_installation, "--show-commit", ref, 
NULL);
-  installed = (commit != NULL);
 
-  args = g_ptr_array_new_with_free_func (g_free);
-  g_ptr_array_add (args, g_strdup ("flatpak"));
-  add_installation_args (args, opt_user, opt_installation);
-  if (installed)
+  if (commit != NULL)
     {
-      g_ptr_array_add (args, g_strdup ("update"));
-      g_ptr_array_add (args, g_strdup ("--subpath="));
+      g_print("Updating %s\n", ref);
+      if (builder_manifest_update_single_dep(ref, opt_user, opt_installation,
+                                             error))
+      {
+        return TRUE;
+      }
     }
   else
     {
-      g_ptr_array_add (args, g_strdup ("install"));
-      g_ptr_array_add (args, g_strdup (remote));
-    }
-
-  g_ptr_array_add (args, g_strdup ("-y"));
-  if (flatpak_version_check (1, 2, 0))
-    g_ptr_array_add (args, g_strdup ("--noninteractive"));
-
-  g_ptr_array_add (args, g_strdup (ref));
-  g_ptr_array_add (args, NULL);
-
-  if (!builder_maybe_host_spawnv (NULL, NULL, 0, error, (const char * const 
*)args->pdata))
-    {
-      g_autofree char *commandline = flatpak_quote_argv ((const char 
**)args->pdata);
-      g_prefix_error (error, "running `%s`: ", commandline);
-      return FALSE;
+      gboolean multiple_remotes = (*(remotes+1) != NULL);
+      for (const char *remote = *remotes; remote != NULL; remote = 
*(++remotes))
+       {
+         g_autoptr(GError) current_error = NULL;
+         if (multiple_remotes)
+           {
+            g_print("Trying to install %s from %s\n", ref, remote);
+           }
+         else {
+           g_print("Installing %s from %s\n", ref, remote);
+         }
+         if (builder_manifest_install_single_dep (ref, remote, opt_user, 
opt_installation,
+                                                   &current_error))
+         {
+           return TRUE;
+         }
+         else {
+           gboolean fatal_error = current_error->domain != G_SPAWN_EXIT_ERROR;
+           if (first_error == NULL)
+             {
+               first_error = g_steal_pointer(&current_error);
+             }
+           if (fatal_error)
+             {
+               break;
+             }
+         }
+       }
     }
-
-  return TRUE;
+  *error = g_steal_pointer(&first_error);
+  return FALSE;
 }
 
 static gboolean
@@ -3816,7 +3895,7 @@
                                          const char *runtime,
                                          const char *runtime_version,
                                          char **runtime_extensions,
-                                         const char *remote,
+                                         char * const *remotes,
                                          gboolean opt_user,
                                          const char *opt_installation,
                                          gboolean opt_yes,
@@ -3864,7 +3943,7 @@
         extension_version = g_strdup (runtime_version);
 
       g_print ("Dependency Extension: %s %s\n", runtime_extensions[i], 
extension_version);
-      if (!builder_manifest_install_dep (self, context, remote, opt_user, 
opt_installation,
+      if (!builder_manifest_install_dep (self, context, remotes, opt_user, 
opt_installation,
                                          runtime_extensions[i], 
extension_version,
                                          opt_yes,
                                          error))
@@ -3877,7 +3956,7 @@
 gboolean
 builder_manifest_install_deps (BuilderManifest *self,
                                BuilderContext  *context,
-                               const char *remote,
+                               char * const *remotes,
                                gboolean opt_user,
                                const char *opt_installation,
                                gboolean opt_yes,
@@ -3902,7 +3981,7 @@
 
   /* Sdk */
   g_print ("Dependency Sdk: %s %s\n", sdk, sdk_branch);
-  if (!builder_manifest_install_dep (self, context, remote, opt_user, 
opt_installation,
+  if (!builder_manifest_install_dep (self, context, remotes, opt_user, 
opt_installation,
                                      sdk, sdk_branch,
                                      opt_yes,
                                      error))
@@ -3910,7 +3989,7 @@
 
   /* Runtime */
   g_print ("Dependency Runtime: %s %s\n", self->runtime, 
builder_manifest_get_runtime_version (self));
-  if (!builder_manifest_install_dep (self, context, remote, opt_user, 
opt_installation,
+  if (!builder_manifest_install_dep (self, context, remotes, opt_user, 
opt_installation,
                                      self->runtime, 
builder_manifest_get_runtime_version (self),
                                      opt_yes,
                                      error))
@@ -3919,7 +3998,7 @@
   if (self->base)
     {
       g_print ("Dependency Base: %s %s\n", self->base, 
builder_manifest_get_base_version (self));
-      if (!builder_manifest_install_dep (self, context, remote, opt_user, 
opt_installation,
+      if (!builder_manifest_install_dep (self, context, remotes, opt_user, 
opt_installation,
                                          self->base, 
builder_manifest_get_base_version (self),
                                          opt_yes,
                                          error))
@@ -3928,7 +4007,7 @@
 
   if (!builder_manifest_install_extension_deps (self, context,
                                                 sdk, sdk_branch, 
self->sdk_extensions,
-                                                remote,opt_user, 
opt_installation,
+                                                remotes, opt_user, 
opt_installation,
                                                 opt_yes,
                                                 error))
     return FALSE;
@@ -3936,7 +4015,7 @@
   if (!builder_manifest_install_extension_deps (self, context,
                                                 self->runtime, 
builder_manifest_get_runtime_version (self),
                                                 self->platform_extensions,
-                                                remote, opt_user, 
opt_installation,
+                                                remotes, opt_user, 
opt_installation,
                                                 opt_yes,
                                                 error))
     return FALSE;
@@ -3951,7 +4030,7 @@
         continue;
 
       g_print ("Dependency Extension: %s %s\n", name, version);
-      if (!builder_manifest_install_dep (self, context, remote, opt_user, 
opt_installation,
+      if (!builder_manifest_install_dep (self, context, remotes, opt_user, 
opt_installation,
                                          name, version,
                                          opt_yes,
                                          error))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/flatpak-builder-1.0.7/src/builder-manifest.h 
new/flatpak-builder-1.0.8/src/builder-manifest.h
--- old/flatpak-builder-1.0.7/src/builder-manifest.h    2019-02-04 
10:33:14.000000000 +0100
+++ new/flatpak-builder-1.0.8/src/builder-manifest.h    2019-06-26 
12:42:09.000000000 +0200
@@ -98,7 +98,7 @@
                                         GError         **error);
 gboolean        builder_manifest_install_deps (BuilderManifest *self,
                                                BuilderContext  *context,
-                                               const char *remote,
+                                               char * const *remotes,
                                                gboolean opt_user,
                                                const char *opt_installation,
                                                gboolean opt_yes,


Reply via email to