Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.3
gconf2
gconf2-fdatasync.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gconf2-fdatasync.patch of Package gconf2
diff -ur *6.orig/backends/markup-tree.c GConf-3.2.6/backends/markup-tree.c --- *6.orig/backends/markup-tree.c 2011-08-15 21:59:31.000000000 -0500 +++ GConf-3.2.6/backends/markup-tree.c 2015-01-02 16:04:16.479034791 -0600 @@ -4350,6 +4350,12 @@ return dir->is_dir_empty; } +static gboolean +install_in_progress () +{ + return (g_strcmp0 (getenv ("YAST_IS_RUNNING"), "instsys") == 0); +} + static void save_tree_with_locale (MarkupDir *dir, gboolean save_as_subtree, @@ -4398,7 +4404,8 @@ */ if (dir->entries == NULL && (!save_as_subtree || dir->subdirs == NULL)) { - fsync (new_fd); + if (!install_in_progress ()) + fdatasync (new_fd); close (new_fd); new_fd = -1; goto done_writing; @@ -4479,7 +4486,7 @@ goto done_writing; } - if (fflush (f) != 0 || fsync (fileno (f)) < 0) + if (fflush (f) != 0 || (!install_in_progress () && fdatasync (fileno (f)) < 0)) { gconf_log (GCL_WARNING, _("Could not flush file '%s' to disk: %s"), diff -ur *6.orig/backends/xml-dir.c GConf-3.2.6/backends/xml-dir.c --- *6.orig/backends/xml-dir.c 2011-08-15 21:59:31.000000000 -0500 +++ GConf-3.2.6/backends/xml-dir.c 2015-01-02 16:04:16.480034791 -0600 @@ -383,7 +383,7 @@ #ifdef HAVE_FSYNC /* sync kernel-space buffers to disk */ - if (fsync (fd) == -1) + if (g_strcmp0 (getenv ("YAST_IS_RUNNING"), "instsys") && fdatasync (fd) == -1) return -1; #endif diff -ur *6.orig/gconf/gconfd.c GConf-3.2.6/gconf/gconfd.c --- *6.orig/gconf/gconfd.c 2012-04-25 20:12:49.000000000 -0500 +++ GConf-3.2.6/gconf/gconfd.c 2015-01-02 16:04:16.481034791 -0600 @@ -1878,7 +1878,7 @@ goto out; } - if (fsync (fd) < 0) + if (g_strcmp0 (getenv ("YAST_IS_RUNNING"), "instsys") && fdatasync (fd) < 0) { gconf_log (GCL_WARNING, _("Could not flush saved state file '%s' to disk: %s"),
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor