[arch-commits] Commit in libgit2-glib/repos/staging-x86_64 (4 files)

Jan Steffens heftig at archlinux.org
Wed Feb 26 10:02:25 UTC 2020


    Date: Wednesday, February 26, 2020 @ 10:02:25
  Author: heftig
Revision: 376252

archrelease: copy trunk to staging-x86_64

Added:
  libgit2-glib/repos/staging-x86_64/PKGBUILD
    (from rev 376251, libgit2-glib/trunk/PKGBUILD)
  libgit2-glib/repos/staging-x86_64/build.diff
    (from rev 376251, libgit2-glib/trunk/build.diff)
Deleted:
  libgit2-glib/repos/staging-x86_64/PKGBUILD
  libgit2-glib/repos/staging-x86_64/build.diff

------------+
 PKGBUILD   |  108 +++++++-------
 build.diff |  426 ++++++++++++++++++++++++++++++++++++++++++++++-------------
 2 files changed, 388 insertions(+), 146 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-02-26 10:00:35 UTC (rev 376251)
+++ PKGBUILD	2020-02-26 10:02:25 UTC (rev 376252)
@@ -1,54 +0,0 @@
-# Maintainer: Lukas Fleischer <lfleischer at archlinux.org>
-# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
-# Contributor: David Runge <dave at sleepmap.de>
-
-pkgname=libgit2-glib
-pkgver=0.99.0
-pkgrel=1
-pkgdesc="GLib wrapper for libgit2"
-url="https://wiki.gnome.org/Projects/Libgit2-glib"
-license=('LGPL2.1')
-arch=('x86_64')
-depends=('glib2' 'libgit2')
-makedepends=('gobject-introspection' 'gtk-doc' 'meson' 'python-gobject' 'vala'
-             'git')
-_commit=0a55b5a078af476d522d89e60cd0a49e8722f066  # tags/v.0.99.0^0
-source=("git+https://gitlab.gnome.org/GNOME/libgit2-glib.git#commit=$_commit"
-        build.diff)
-sha256sums=('SKIP'
-            '8f2a5e245f70f7685ba3692074ed1d372cf766b4a490f67b101f68f054e22289')
-
-pkgver() {
-  cd $pkgname
-  git describe --tags | sed -r 's/^v\.?//;s/-/+/g'
-}
-
-prepare() {
-  cd $pkgname
-
-  # build fixes
-  git apply -3 ../build.diff
-}
-
-build() {
-  arch-meson $pkgname build -D gtk_doc=true
-  ninja -C build
-}
-
-check() {
-  meson test -C build --print-errorlogs
-}
-
-package() {
-  depends+=('libgit2.so')
-  provides+=('libgit2-glib-1.0.so')
-
-  DESTDIR="$pkgdir" meson install -C build
-
-  # strip $pkgdir from embedded paths:
-  python -m compileall -d "/usr/lib" "$pkgdir/usr/lib"
-  python -O -m compileall -d "/usr/lib" "$pkgdir/usr/lib"
-
-  install -vDm 644 $pkgname/{AUTHORS,ChangeLog,NEWS,README} \
-    -t "${pkgdir}/usr/share/doc/${pkgname}"
-}

Copied: libgit2-glib/repos/staging-x86_64/PKGBUILD (from rev 376251, libgit2-glib/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-02-26 10:02:25 UTC (rev 376252)
@@ -0,0 +1,54 @@
+# Maintainer: Lukas Fleischer <lfleischer at archlinux.org>
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
+# Contributor: David Runge <dave at sleepmap.de>
+
+pkgname=libgit2-glib
+pkgver=0.99.0+2+g0c28c3a
+pkgrel=1
+pkgdesc="GLib wrapper for libgit2"
+url="https://wiki.gnome.org/Projects/Libgit2-glib"
+license=('LGPL2.1')
+arch=('x86_64')
+depends=('glib2' 'libgit2')
+makedepends=('gobject-introspection' 'gtk-doc' 'meson' 'python-gobject' 'vala'
+             'git')
+_commit=0c28c3af2c83e84a0a368ea9ff12502ee3cbbbde  # master
+source=("git+https://gitlab.gnome.org/GNOME/libgit2-glib.git#commit=$_commit"
+        build.diff)
+sha256sums=('SKIP'
+            'ab872e2de395d3280aaa8da84524a09b1b0ba2800a40b53c1422fb2647e1ec44')
+
+pkgver() {
+  cd $pkgname
+  git describe --tags | sed -r 's/^v\.?//;s/-/+/g'
+}
+
+prepare() {
+  cd $pkgname
+
+  # build fixes
+  git apply -3 ../build.diff
+}
+
+build() {
+  arch-meson $pkgname build -D gtk_doc=true
+  ninja -C build
+}
+
+check() {
+  meson test -C build --print-errorlogs
+}
+
+package() {
+  depends+=('libgit2.so')
+  provides+=('libgit2-glib-1.0.so')
+
+  DESTDIR="$pkgdir" meson install -C build
+
+  # strip $pkgdir from embedded paths:
+  python -m compileall -d "/usr/lib" "$pkgdir/usr/lib"
+  python -O -m compileall -d "/usr/lib" "$pkgdir/usr/lib"
+
+  install -vDm 644 $pkgname/{AUTHORS,ChangeLog,NEWS,README} \
+    -t "${pkgdir}/usr/share/doc/${pkgname}"
+}

Deleted: build.diff
===================================================================
--- build.diff	2020-02-26 10:00:35 UTC (rev 376251)
+++ build.diff	2020-02-26 10:02:25 UTC (rev 376252)
@@ -1,92 +0,0 @@
-diff --git i/libgit2-glib/ggit-cred-plaintext.c w/libgit2-glib/ggit-cred-plaintext.c
-index 6ae3218..a8bc643 100644
---- i/libgit2-glib/ggit-cred-plaintext.c
-+++ w/libgit2-glib/ggit-cred-plaintext.c
-@@ -179,7 +179,7 @@ ggit_cred_plaintext_initable_init (GInitable    *initable,
- 
- 	_ggit_native_set (initable,
- 	                  cred,
--	                  (GDestroyNotify)cred->free);
-+	                  (GDestroyNotify)git_cred_free);
- 
- 	return TRUE;
- }
-diff --git i/libgit2-glib/ggit-cred-ssh-interactive.c w/libgit2-glib/ggit-cred-ssh-interactive.c
-index 97f51cf..d0489bd 100644
---- i/libgit2-glib/ggit-cred-ssh-interactive.c
-+++ w/libgit2-glib/ggit-cred-ssh-interactive.c
-@@ -246,7 +246,7 @@ ggit_cred_ssh_interactive_initable_init (GInitable     *initable,
- 
- 	_ggit_native_set (initable,
- 	                  cred,
--	                  (GDestroyNotify)cred->free);
-+	                  (GDestroyNotify)git_cred_free);
- 
- 	return TRUE;
- }
-diff --git i/libgit2-glib/ggit-cred-ssh-key-from-agent.c w/libgit2-glib/ggit-cred-ssh-key-from-agent.c
-index 2931b43..62ba7a3 100644
---- i/libgit2-glib/ggit-cred-ssh-key-from-agent.c
-+++ w/libgit2-glib/ggit-cred-ssh-key-from-agent.c
-@@ -155,7 +155,7 @@ ggit_cred_ssh_key_from_agent_initable_init (GInitable     *initable,
- 
- 	_ggit_native_set (initable,
- 	                  cred,
--	                  (GDestroyNotify)cred->free);
-+	                  (GDestroyNotify)git_cred_free);
- 
- 	return TRUE;
- }
-diff --git i/meson.build w/meson.build
-index 6d314b5..32c08d4 100644
---- i/meson.build
-+++ w/meson.build
-@@ -135,7 +135,8 @@ if enable_vapi
-   assert(enable_gir, 'vapi support was requested, but introspection support is mandatory.')
-   assert(add_languages('vala', required: false), 'vapi support was requested, but vala not found.')
- 
--  meson.add_install_script('meson_vapi_link.py', libgit2_glib_datadir)
-+  # Requires the prefix-relative datadir
-+  meson.add_install_script('meson_vapi_link.py', get_option('datadir'))
- endif
- 
- # Check for libgit2 ssh support
-diff --git i/meson_python_compile.py w/meson_python_compile.py
-index 1ffe0c0..24a74d8 100755
---- i/meson_python_compile.py
-+++ w/meson_python_compile.py
-@@ -8,7 +8,7 @@ if not os.environ.get('DESTDIR'):
-   libdir = sys.argv[1]
- 
-   print('Byte-compiling python modules...')
--  subprocess.call(['python3', '-m', 'compileall', '-f', '-q', libdir])
-+  subprocess.check_call(['python3', '-m', 'compileall', '-f', '-q', libdir])
- 
-   print('Byte-compiling python modules (optimized versions) ...')
--  subprocess.call(['python3', '-O', '-m', 'compileall', '-f', '-q', libdir])
-+  subprocess.check_call(['python3', '-O', '-m', 'compileall', '-f', '-q', libdir])
-diff --git i/meson_vapi_link.py w/meson_vapi_link.py
-index eb64fd6..3b4155e 100644
---- i/meson_vapi_link.py
-+++ w/meson_vapi_link.py
-@@ -5,18 +5,14 @@ import subprocess
- import sys
- 
- vapidir = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], sys.argv[1], 'vala', 'vapi')
-+os.chdir(vapidir)
- 
- # FIXME: meson will not track the creation of these files
- #        https://github.com/mesonbuild/meson/blob/master/mesonbuild/scripts/uninstall.py#L39
- old = 'ggit-1.0'
- new = 'libgit2-glib-1.0'
- 
--wd = os.getcwd()
--os.chdir(vapidir)
--
- for ext in ['vapi', 'deps']:
-   src = os.path.join('{}.{}'.format(new, ext))
-   dest = os.path.join('{}.{}'.format(old, ext))
--  subprocess.call(['ln', '-s', '-f', src, dest])
--
--os.chdir(wd)
-+  subprocess.check_call(['ln', '-s', '-f', src, dest])

Copied: libgit2-glib/repos/staging-x86_64/build.diff (from rev 376251, libgit2-glib/trunk/build.diff)
===================================================================
--- build.diff	                        (rev 0)
+++ build.diff	2020-02-26 10:02:25 UTC (rev 376252)
@@ -0,0 +1,334 @@
+diff --git i/examples/clone.c w/examples/clone.c
+index 8f6fc87..89622f9 100644
+--- i/examples/clone.c
++++ w/examples/clone.c
+@@ -16,30 +16,29 @@ typedef struct
+ 	GgitRemoteCallbacks parent;
+ } Cloner;
+ 
+-static void cloner_class_init (ClonerClass *klass);
++GType cloner_get_type (void);
+ 
+ G_DEFINE_TYPE (Cloner, cloner, GGIT_TYPE_REMOTE_CALLBACKS)
+ 
+ static void
+ cloner_init (Cloner *cloner)
+ {
+ }
+ 
+ static void
+ cloner_transfer_progress (GgitRemoteCallbacks   *callbacks,
+                           GgitTransferProgress  *stats)
+ {
+-	guint recvobjs;
+-	guint totobjs;
+-	guint indexobjs;
++	guint recvobjs, totobjs, indexobjs;
++	guint network_percent, index_percent, kbytes;
+ 
+ 	recvobjs = ggit_transfer_progress_get_received_objects (stats);
+ 	totobjs = ggit_transfer_progress_get_total_objects (stats);
+ 	indexobjs = ggit_transfer_progress_get_indexed_objects (stats);
+ 
+-	guint network_percent = totobjs > 0 ? recvobjs * 100 / totobjs : 0;
+-	guint index_percent = totobjs > 0 ? indexobjs * 100 / totobjs : 0;
+-	guint kbytes = ggit_transfer_progress_get_received_bytes (stats) / 1024;
++	network_percent = totobjs > 0 ? recvobjs * 100 / totobjs : 0;
++	index_percent = totobjs > 0 ? indexobjs * 100 / totobjs : 0;
++	kbytes = ggit_transfer_progress_get_received_bytes (stats) / 1024;
+ 
+ 	g_printf ("\rnet %3d%% (%4d kb, %5d/%5d)  /  idx %3d%% (%5d/%5d)",
+ 	          network_percent, kbytes,
+diff --git i/libgit2-glib/ggit-cred-plaintext.c w/libgit2-glib/ggit-cred-plaintext.c
+index 1f2390f..b55d9c9 100644
+--- i/libgit2-glib/ggit-cred-plaintext.c
++++ w/libgit2-glib/ggit-cred-plaintext.c
+@@ -180,9 +180,9 @@ ggit_cred_plaintext_initable_init (GInitable    *initable,
+ 	_ggit_native_set (initable,
+ 	                  cred,
+ #if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 99)
+-	                  (GDestroyNotify)git_credential_free (cred));
++	                  (GDestroyNotify)git_credential_free);
+ #else
+-	                  (GDestroyNotify)git_cred_free (cred));
++	                  (GDestroyNotify)git_cred_free);
+ #endif
+ 
+ 	return TRUE;
+diff --git i/libgit2-glib/ggit-cred-ssh-interactive.c w/libgit2-glib/ggit-cred-ssh-interactive.c
+index 79e5a4e..4f60f8b 100644
+--- i/libgit2-glib/ggit-cred-ssh-interactive.c
++++ w/libgit2-glib/ggit-cred-ssh-interactive.c
+@@ -247,9 +247,9 @@ ggit_cred_ssh_interactive_initable_init (GInitable     *initable,
+ 	_ggit_native_set (initable,
+ 	                  cred,
+ #if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 99)
+-	                  (GDestroyNotify)git_credential_free (cred));
++	                  (GDestroyNotify)git_credential_free);
+ #else
+-	                  (GDestroyNotify)git_cred_free (cred));
++	                  (GDestroyNotify)git_cred_free);
+ #endif
+ 
+ 	return TRUE;
+diff --git i/libgit2-glib/ggit-cred-ssh-key-from-agent.c w/libgit2-glib/ggit-cred-ssh-key-from-agent.c
+index 0de589f..b8a6bcf 100644
+--- i/libgit2-glib/ggit-cred-ssh-key-from-agent.c
++++ w/libgit2-glib/ggit-cred-ssh-key-from-agent.c
+@@ -156,9 +156,9 @@ ggit_cred_ssh_key_from_agent_initable_init (GInitable     *initable,
+ 	_ggit_native_set (initable,
+ 	                  cred,
+ #if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 99)
+-	                  (GDestroyNotify)git_credential_free (cred));
++	                  (GDestroyNotify)git_credential_free);
+ #else
+-	                  (GDestroyNotify)git_cred_free (cred));
++	                  (GDestroyNotify)git_cred_free);
+ #endif
+ 
+ 	return TRUE;
+diff --git i/libgit2-glib/ggit-object-factory.c w/libgit2-glib/ggit-object-factory.c
+index 59db627..c508c09 100644
+--- i/libgit2-glib/ggit-object-factory.c
++++ w/libgit2-glib/ggit-object-factory.c
+@@ -81,7 +81,7 @@ ggit_object_factory_constructor (GType                  type,
+ 
+ 	if (the_instance)
+ 	{
+-		return g_object_ref (the_instance);
++		return G_OBJECT (g_object_ref (the_instance));
+ 	}
+ 
+ 	ret = G_OBJECT_CLASS (ggit_object_factory_parent_class)->constructor (type,
+@@ -185,26 +185,6 @@ ggit_object_factory_unregister (GgitObjectFactory *factory,
+ 	}
+ }
+ 
+-static GParameter *
+-convert_to_gparameter (GObjectConstructParam *params,
+-                       guint                  num)
+-{
+-	GParameter *ret;
+-	guint i;
+-
+-	ret = g_new0 (GParameter, num);
+-
+-	for (i = 0; i < num; ++i)
+-	{
+-		ret[i].name = params[i].pspec->name;
+-
+-		g_value_init (&ret[i].value, G_VALUE_TYPE (params[i].value));
+-		g_value_copy (params[i].value, &ret[i].value);
+-	}
+-
+-	return ret;
+-}
+-
+ /**
+  * ggit_object_factory_construct:
+  * @factory: a #GgitObjectFactory.
+@@ -235,21 +215,33 @@ ggit_object_factory_construct (GgitObjectFactory     *factory,
+ 
+ 	if (val)
+ 	{
+-		/* convert construct properties to gparameter and call newv */
+-		GParameter *params;
++		/* convert construct properties and call new_with_properties */
++		const char **names;
++		GValue *values;
+ 		guint i;
+ 
+-		params = convert_to_gparameter (construct_properties,
+-		                                n_construct_properties);
+-
+-		ret = g_object_newv (val->type, n_construct_properties, params);
++		names = g_newa (const char *, n_construct_properties);
++		values = g_newa (GValue, n_construct_properties);
+ 
+ 		for (i = 0; i < n_construct_properties; ++i)
+ 		{
+-			g_value_unset (&params[i].value);
++			GType type;
++
++			names[i] = construct_properties[i].pspec->name;
++			type = G_VALUE_TYPE (construct_properties[i].value);
++
++			g_value_init (&values[i], type);
++			g_value_copy (construct_properties[i].value, &values[i]);
+ 		}
+ 
+-		g_free (params);
++		ret = g_object_new_with_properties (val->type,
++		                                    n_construct_properties,
++		                                    names, values);
++
++		for (i = 0; i < n_construct_properties; ++i)
++		{
++			g_value_unset (&values[i]);
++		}
+ 	}
+ 	else
+ 	{
+diff --git i/libgit2-glib/ggit-repository.c w/libgit2-glib/ggit-repository.c
+index 4273bd0..a2a4301 100644
+--- i/libgit2-glib/ggit-repository.c
++++ w/libgit2-glib/ggit-repository.c
+@@ -4025,21 +4025,22 @@ ggit_repository_note_foreach (GgitRepository    *repository,
+ void
+ ggit_repository_merge (GgitRepository       *repository,
+                        GgitAnnotatedCommit **their_heads,
+-                       gsize                *their_heads_length,
++                       gsize                 their_heads_length,
+                        GgitMergeOptions     *merge_opts,
+                        GgitCheckoutOptions  *checkout_opts,
+                        GError              **error)
+ {
+-	gint ret, i;
+-	git_annotated_commit **their_heads_native;
++	gint ret;
++	gsize i;
++	const git_annotated_commit **their_heads_native;
+ 
+ 	g_return_if_fail (GGIT_IS_REPOSITORY (repository));
+ 	g_return_if_fail (their_heads != NULL);
+ 	g_return_if_fail (their_heads_length > 0);
+ 	g_return_if_fail (GGIT_IS_CHECKOUT_OPTIONS (checkout_opts));
+ 	g_return_if_fail (error == NULL || *error == NULL);
+ 
+-	their_heads_native = g_new0 (git_annotated_commit *, their_heads_length);
++	their_heads_native = g_new0 (const git_annotated_commit *, their_heads_length);
+ 
+ 	for (i = 0; i < their_heads_length; ++i)
+ 	{
+diff --git i/libgit2-glib/ggit-repository.h w/libgit2-glib/ggit-repository.h
+index 0b3c7ca..e522e0d 100644
+--- i/libgit2-glib/ggit-repository.h
++++ w/libgit2-glib/ggit-repository.h
+@@ -507,7 +507,7 @@ gboolean            ggit_repository_path_is_ignored    (GgitRepository
+ 
+ void                ggit_repository_merge              (GgitRepository          *repository,
+                                                         GgitAnnotatedCommit    **their_heads,
+-                                                        gsize                   *their_heads_length,
++                                                        gsize                    their_heads_length,
+                                                         GgitMergeOptions        *merge_opts,
+                                                         GgitCheckoutOptions     *checkout_opts,
+                                                         GError                 **error);
+diff --git i/libgit2-glib/ggit-submodule-update-options.c w/libgit2-glib/ggit-submodule-update-options.c
+index 3a1cd3e..47b9d90 100644
+--- i/libgit2-glib/ggit-submodule-update-options.c
++++ w/libgit2-glib/ggit-submodule-update-options.c
+@@ -161,7 +161,7 @@ ggit_submodule_update_options_new (void)
+ 	return g_object_new (GGIT_TYPE_SUBMODULE_UPDATE_OPTIONS, NULL);
+ }
+ 
+-const git_submodule_update_options *
++git_submodule_update_options *
+ _ggit_submodule_update_options_get_submodule_update_options (GgitSubmoduleUpdateOptions *options)
+ {
+ 	if (options != NULL)
+diff --git i/libgit2-glib/ggit-submodule-update-options.h w/libgit2-glib/ggit-submodule-update-options.h
+index d26290b..8310e90 100644
+--- i/libgit2-glib/ggit-submodule-update-options.h
++++ w/libgit2-glib/ggit-submodule-update-options.h
+@@ -37,7 +37,7 @@ struct _GgitSubmoduleUpdateOptionsClass
+ 	GObjectClass parent_class;
+ };
+ 
+-const git_submodule_update_options *
++git_submodule_update_options *
+                       _ggit_submodule_update_options_get_submodule_update_options (GgitSubmoduleUpdateOptions  *options);
+ 
+ GgitSubmoduleUpdateOptions  *ggit_submodule_update_options_new             (void);
+diff --git i/meson.build w/meson.build
+index 6d314b5..32c08d4 100644
+--- i/meson.build
++++ w/meson.build
+@@ -135,7 +135,8 @@ if enable_vapi
+   assert(enable_gir, 'vapi support was requested, but introspection support is mandatory.')
+   assert(add_languages('vala', required: false), 'vapi support was requested, but vala not found.')
+ 
+-  meson.add_install_script('meson_vapi_link.py', libgit2_glib_datadir)
++  # Requires the prefix-relative datadir
++  meson.add_install_script('meson_vapi_link.py', get_option('datadir'))
+ endif
+ 
+ # Check for libgit2 ssh support
+diff --git i/meson_python_compile.py w/meson_python_compile.py
+index 1ffe0c0..24a74d8 100755
+--- i/meson_python_compile.py
++++ w/meson_python_compile.py
+@@ -8,7 +8,7 @@ if not os.environ.get('DESTDIR'):
+   libdir = sys.argv[1]
+ 
+   print('Byte-compiling python modules...')
+-  subprocess.call(['python3', '-m', 'compileall', '-f', '-q', libdir])
++  subprocess.check_call(['python3', '-m', 'compileall', '-f', '-q', libdir])
+ 
+   print('Byte-compiling python modules (optimized versions) ...')
+-  subprocess.call(['python3', '-O', '-m', 'compileall', '-f', '-q', libdir])
++  subprocess.check_call(['python3', '-O', '-m', 'compileall', '-f', '-q', libdir])
+diff --git i/meson_vapi_link.py w/meson_vapi_link.py
+index eb64fd6..dc30903 100644
+--- i/meson_vapi_link.py
++++ w/meson_vapi_link.py
+@@ -1,22 +1,21 @@
+ #!/usr/bin/env python3
+ 
+ import os
+-import subprocess
++import shutil
+ import sys
+ 
+ vapidir = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], sys.argv[1], 'vala', 'vapi')
++os.chdir(vapidir)
+ 
+ # FIXME: meson will not track the creation of these files
+ #        https://github.com/mesonbuild/meson/blob/master/mesonbuild/scripts/uninstall.py#L39
+ old = 'ggit-1.0'
+ new = 'libgit2-glib-1.0'
+ 
+-wd = os.getcwd()
+-os.chdir(vapidir)
+-
+ for ext in ['vapi', 'deps']:
+-  src = os.path.join('{}.{}'.format(new, ext))
+-  dest = os.path.join('{}.{}'.format(old, ext))
+-  subprocess.call(['ln', '-s', '-f', src, dest])
+-
+-os.chdir(wd)
++  src = '{}.{}'.format(new, ext)
++  dest = '{}.{}'.format(old, ext)
++  try:
++      os.symlink(src, dest)
++  except OSError:
++      shutil.copy(src, dest)
+diff --git i/tests/repository.c w/tests/repository.c
+index 7396ef7..c1d9a43 100644
+--- i/tests/repository.c
++++ w/tests/repository.c
+@@ -73,22 +73,22 @@ _g_mkdtemp (gchar *tmpl)
+ 	static const int NLETTERS = sizeof (letters) - 1;
+ 	static int counter = 0;
+ 	char *XXXXXX;
+-	GTimeVal tv;
++	gint64 time;
+ 	glong value;
+ 	int count;
+ 
+ 	/* find the last occurrence of "XXXXXX" */
+ 	XXXXXX = g_strrstr (tmpl, "XXXXXX");
+ 
+ 	if (!XXXXXX || strncmp (XXXXXX, "XXXXXX", 6))
+ 	{
+ 		errno = EINVAL;
+ 		return NULL;
+ 	}
+ 
+ 	/* Get some more or less random data.  */
+-	g_get_current_time (&tv);
+-	value = (tv.tv_usec ^ tv.tv_sec) + counter++;
++	time = g_get_real_time ();
++	value = ((time % G_USEC_PER_SEC) ^ (time / G_USEC_PER_SEC)) + counter++;
+ 
+ 	for (count = 0; count < 100; value += 7777, ++count)
+ 	{



More information about the arch-commits mailing list