gnucash master: Multiple changes pushed
Geert Janssens
gjanssens at code.gnucash.org
Sat Sep 16 13:34:05 EDT 2017
Updated via https://github.com/Gnucash/gnucash/commit/2ac118f8 (commit)
via https://github.com/Gnucash/gnucash/commit/61a90d99 (commit)
from https://github.com/Gnucash/gnucash/commit/3a1f7d73 (commit)
commit 2ac118f80c84998d7fd0e8a41b04152b2fca347e
Author: Geert Janssens <geert at kobaltwit.be>
Date: Sat Sep 16 19:33:56 2017 +0200
Improve a few comments.
diff --git a/libgnucash/core-utils/gnc-filepath-utils.cpp b/libgnucash/core-utils/gnc-filepath-utils.cpp
index d3e7ca7..f2316ad 100644
--- a/libgnucash/core-utils/gnc-filepath-utils.cpp
+++ b/libgnucash/core-utils/gnc-filepath-utils.cpp
@@ -554,6 +554,12 @@ gnc_filepath_init(gboolean create)
}
}
+ /* The fall back to the tmp dir is to accomodate for very restricted
+ * distribution build environments. In some such cases
+ * there is no home directory available, which would cause the build
+ * to fail (as this code is actually run while compiling guile scripts).
+ * This is worked around by continuing with a userdata directory
+ * in the temporary directory which always exists. */
if (!userdata_is_home)
gnc_userdata_home = userdata_home / PACKAGE_NAME;
gnc_userdata_home_exists = bfs::exists(gnc_userdata_home);
diff --git a/libgnucash/core-utils/test/test-userdata-dir-invalid-home.c b/libgnucash/core-utils/test/test-userdata-dir-invalid-home.c
index 0195c43..f6108c1 100644
--- a/libgnucash/core-utils/test/test-userdata-dir-invalid-home.c
+++ b/libgnucash/core-utils/test/test-userdata-dir-invalid-home.c
@@ -1,5 +1,5 @@
/***************************************************************************
- * test-resolve-file-path.c
+ * test-userdata-dir-invalid-home.c
*
* Thu Sep 29 22:48:57 2005
* Copyright 2005 GnuCash team
@@ -65,7 +65,9 @@ main(G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
int i;
const char *tmp_dir = g_get_tmp_dir();
- /* Run usr conf dir tests with a valid and writable homedir */
+ /* Run usr conf dir tests with an invalid homedir
+ * The code should fall back to using the temporary
+ * directory in that case. */
g_setenv("HOME", "/notexist", TRUE);
for (i = 0; strs2[i].funcname != NULL; i++)
{
diff --git a/libgnucash/core-utils/test/test-userdata-dir.c b/libgnucash/core-utils/test/test-userdata-dir.c
index 3197a0b..7046336 100644
--- a/libgnucash/core-utils/test/test-userdata-dir.c
+++ b/libgnucash/core-utils/test/test-userdata-dir.c
@@ -1,5 +1,5 @@
/***************************************************************************
- * test-resolve-file-path.c
+ * test-userdata-dir.c
*
* Thu Sep 29 22:48:57 2005
* Copyright 2005 GnuCash team
commit 61a90d99fb37adcaed0cd9e5fc5523f878f5def8
Author: Geert Janssens <geert at kobaltwit.be>
Date: Sat Sep 16 19:18:01 2017 +0200
Disable creating a user_data_dir in the test environment
The code should be able to cope with this
diff --git a/util/ci/commonbuild b/util/ci/commonbuild
index 3df33a5..07d13d0 100644
--- a/util/ci/commonbuild
+++ b/util/ci/commonbuild
@@ -4,7 +4,7 @@ mkdir build;
cd build;
export TZ="America/Los_Angeles";
-mkdir -p /root/.local/share;
+#mkdir -p /root/.local/share;
if [[ "$BUILDTYPE" == "cmake-make" ]]; then
cmake ../gnucash
Summary of changes:
libgnucash/core-utils/gnc-filepath-utils.cpp | 6 ++++++
libgnucash/core-utils/test/test-userdata-dir-invalid-home.c | 6 ++++--
libgnucash/core-utils/test/test-userdata-dir.c | 2 +-
util/ci/commonbuild | 2 +-
4 files changed, 12 insertions(+), 4 deletions(-)
More information about the gnucash-changes
mailing list