| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
It’s a little counterintuitive that a function called ‘read’ could
sometimes move a file (which could be considered a write).
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
|
|
|
|
|
| |
The former has been deprecated for a long time.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
| |
|
|
|
|
| |
We ought to be including this from each .c file.
|
|
|
|
| |
gcc doesn't like 'a && b;' so use 'if (a) b;'.
|
|
|
|
| |
Mostly missing 'static'.
|
|
|
|
|
| |
Fairly harmless leaks. One only happens in an error case (like the disk
being full) and the other only happens on startup.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When emitting change signals, we call dconf_changeset_describe() to
enumerate the keys to send the signal for.
When the changeset is empty, this function returns NULL for the path
vector. We pass that NULL into the signal emitter and the service
crashes.
We can avoid this situation by refusing to handle empty changesets in
the first place.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Store the keyfile in ~/.config/dconf/$(name).txt instead of
~/.config/dconf-keyfile/name. Adjust the base writer not to pick up
filenames with dots in them (so we will skip the .txt files the keyfile
writer puts into the same directory).
Add file change monitoring and reload the file if anyone changes it.
Fix a crasher on the first write of a file if it does not yet exist.
Add proper finalize handling.
|
|
|
|
|
| |
Don't rewrite the gvdb file unless an actual change has been applied to
the database (unless creating a non-native database for the first time).
|
|
|
|
|
|
|
| |
This diffs the given changeset with the uncommited changes in the
writer. The result is effectively the changeset that would have to be
applied to the writer to cause it to be equal to the passed-in
changeset.
|
|
|
|
|
|
| |
Add support for service-db to the service.
New types of service-dbs can be implemented via a GIOExtensionPoint.
|
| |
|
|
|
|
|
| |
This populates a set with the names of databases available for a given
writer class.
|
|
|
|
|
| |
dconf_writer_new() now takes a type so we can create subtypes of
DConfWriter.
|
|
|
|
|
|
|
| |
...and add a lot of ->priv.
This is not a public API because this header doesn't get installed, but
it can now be used by other things in-tree.
|
|
|
|
|
|
|
|
|
|
|
|
| |
4fce559d81bdd3841cfe16fd3a3e6b8e6e9e60f2 changed from using GHashTable
to database-mode changesets for caching the state of the database in the
service but we missed a case of g_hash_table_unref being called.
Fix that now.
Problem reported and fix suggested by Philippe Coval.
https://bugzilla.gnome.org/show_bug.cgi?id=691013
|
|
|
|
|
|
| |
Was seeing crashes in the latest gnome-ostree on login.
https://bugzilla.gnome.org/show_bug.cgi?id=690316
|
|
|
|
|
|
|
|
| |
Factor the code for reading and writing DConfChangeset databases to the
gvdb file format out from dconf-writer.c.
This will allow those functions to be used by other backend
implementations that want to store things in gvdb format (like on NFS).
|
|
|
|
|
|
|
|
|
|
|
| |
Also, slightly change the rules about begin/change/commit/end.
It used to be theoretically possible to call:
begin(), change(), commit(), change(), end().
but that is no longer supported (and it was never used anyway). Now the
only valid thing to do after a commit() is end().
|
|
|
|
|
|
|
|
|
|
| |
Port the DConfWriter to use database-mode changesets to represent the
contents of the database.
This allows us to drop our own copy of the reset algorithm.
Also, fix a bug whereby we tried to acquire a list of items from a
NULL gvdb table (in the case where the database does not already exist).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite the dconf-service using gdbus-codegen and generally cleaning
things up a lot. The DConfWriter class can now be reasonably subclassed
to create more complex types of dconf databases (such as ones that
are stored in the local runtime dir and synced up with an NFS home
directory).
Keep a cache of the keys in the database (instead of re-reading it every
time we try to make a change).
Drop support for the old D-Bus interface (now that we are two stable
releases since it was used).
Modify the commandline tool for 'dconf blame' to call the new interface.
|
|
|
|
|
|
|
|
|
|
| |
Clean up the Makefiles and make them as similar as possible.
Move CFLAGS to a common point of definition and stop using -I so much.
Replace the 'dbus stub' with libdconf-mock.a in tests/. Fill in some
stubs for future mock code for shm and gvdb (just to get things
compiling for now).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the shm code from the engine and the service and put it in a
separate convenience library in shm/.
Remove the vestigial shmdir weirdness from the service (since shmdir is
now always relative to XDG_RUNTIME_DIR and has been for some time).
The purpose of this is so that dconf-engine can be properly unit-tested.
dconf-engine now has five points of contact with the world (excluding
the users of the engine themselves):
- the DCONF_PROFILE environment variable
- fopen() of profile files
- shm
- gvdb
- dbus
The environment variable is quite easily controlled. fopen() is
intercepted in the engine testcase with a interpose of the libc symbol.
With this commit now each of dbus, gvdb and shm are implemented in
separate utility modules that can be mocked from the testcases.
|
|
|
|
| |
Add a "Change" method to the service for writing DConfChangesets.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The dconf service can not presently be run at the system level and it
doesn't make sense to support locks on user-level databases. It also
became clear that most distributors and sysadmins would rather work
directly with text files anyway, so we supported that directly instead.
For this reason, 'set lock' support has never been properly implemented.
All the plumbing was added for it though, which means we have it
appearing on the API of the client library and documented in the help of
the commandline tool. This is misleading, since these functions do
nothing at all (and actually contain bugs anyway since their
do-nothingness was never actually tested).
For now, we rip out these functions. We can add them back later if we
decide to support this properly.
|
|
|
|
|
|
| |
It should also work for people who have usernames other than 'desrt'
Closes #634229.
|
|
|
|
|
| |
If we can't open the shm file then don't bother trying to
write/close/unlink it.
|
|
|
|
| |
ie: Fix unitialised variable
|
|
|
|
|
|
|
|
| |
Clean up the service a bit by putting its state into a separate object
that is accessible from the DBus code and the writer.
This way we avoid a circular dependency without sticking inappropriate
data in the writer.
|
|
|
|
|
| |
also, cache GDBusConnections in the client since GDBus doesn't keep them
alive for us.
|
| |
|
|
|
|
| |
Wired up internally but does nothing so far.
|
|
|
|
| |
dconf should be vaguely NFS-safe now
|
|
|
|
|
|
|
| |
Increase the intelligence of the algorithm: use ~/.cache/dconf as a
reasonable default if not on NFS.
The dconf engine now has a non-blocking startup when not on NFS.
|
|
- support the notion of 'profiles'
This is how we will configure layering of databases in dconf. It's
not wired-up yet (except to choose the name of the user database).
- support multiple writers in the service
Using the (very freshly API-broken) GDBus subtree support.
Introspection returns the names of existing databases, but any
object path can be used to create a new database.
- support the start of the 'shm' file
Used to prevent the reader from reopening the gvdb every time.
dconf reads now involve zero system calls in the usual case.
The server is queried on startup for the location of the shm files.
By default, this is in ~/.cache/dconf/ for now. This won't work
properly on NFS, but it's a start.
|