diff options
-rw-r--r-- | bin/dconf-update.vala | 5 | ||||
-rw-r--r-- | docs/dconf-tool.xml | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/bin/dconf-update.vala b/bin/dconf-update.vala index 556dc70..d452092 100644 --- a/bin/dconf-update.vala +++ b/bin/dconf-update.vala @@ -236,8 +236,11 @@ void dconf_compile (string[] args) throws GLib.Error { } try { + // We always write the result of "dconf compile" as little endian + // so that it can be installed in /usr/share var table = read_directory (args[3]); - table.write_contents (args[2]); + var should_byteswap = (BYTE_ORDER == ByteOrder.BIG_ENDIAN); + table.write_contents (args[2], should_byteswap); } catch (Error e) { printerr ("%s\n", e.message); Process.exit (1); diff --git a/docs/dconf-tool.xml b/docs/dconf-tool.xml index c359eda..c606616 100644 --- a/docs/dconf-tool.xml +++ b/docs/dconf-tool.xml @@ -148,7 +148,13 @@ <varlistentry> <term><option>compile</option></term> - <listitem><para>Compile a binary database from keyfiles.</para></listitem> + <listitem> + <para>Compile a binary database from keyfiles.</para> + <para> + The result is always in little-endian byte order, so it can be safely installed in 'share'. If it + is used on a big endian machine, dconf will automatically byteswap the contents on read. + </para> + </listitem> </varlistentry> <varlistentry> |