-
Notifications
You must be signed in to change notification settings - Fork 451
Convert dconf settings to keyfile #2678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| g_debug ("Add defaults in dir %s", prefix); | ||
| add_dconf_dir_to_keyfile (defaults_data, client, prefix); | ||
| add_dconf_dir_to_keyfile (defaults_data, client, prefix, DCONF_READ_DEFAULT_VALUE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we want/need to copy default values? Might as well just insert the minimum subset of user values that are changed?
|
Actually, i misread. We want default values, since they may be changed by the sysadmin, or by something like fleet commander |
|
from irc discussion: We should limit the value propagation to just the app id path, and not allow extra paths here. |
1954a04 to
dfc2ea2
Compare
|
Now we are only looking at the app id path. Unfortunately, my very first test case fails this test: gnome-todo uses org.gnome.Todo as app-id, and /org/gnome/todo/ as dconf path :( |
|
Yeah, I wonder if we should be a bit more lenient with the exact format of the path. Say, allow the app to specify a path, which we weakly match to the app id? For example, don't have to match case, and maybe don't compare any '-' and '_'. Would need to do some research on current use. |
|
So, i don't like the dconf check. And given the pathname mismatch issue maybe we can kill two birds with one stone by adding some kind of "x-dconf-migrate-path" metadata option. Only if/when this is set do we do a (one-time) migration of the user data. And we can allow this path to differ in insignificant ways. |
|
Ok, redone with a migrate-path key. Should we document the valid X-DConf keys somewhere ? |
common/flatpak-run.c
Outdated
| return FALSE; | ||
|
|
||
| if (path1[i] == path2[i]) | ||
| continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't necessary, the tolower() case below handles it to.
|
Other than that this looks good to me. Needs some manual rebasing though. |
Pass the DCONF_READ flags down, so we can use a different one.
We do a one-time conversion of existing dconf user settings into a keyfile in the apps XDG_CONFIG_DIR, where the glib keyfile settingsbackend will look for it.
a7b2be8 to
e158c5b
Compare
|
@rh-atomic-bot r=alexlarsson |
|
📌 Commit e158c5b has been approved by |
|
⚡ Test exempted: merge already tested. |
We do a one-time conversion of existing dconf user settings into a keyfile in the apps XDG_CONFIG_DIR, where the glib keyfile settingsbackend will look for it. Closes: #2678 Approved by: alexlarsson
We do a one-time conversion of existing dconf user settings into a keyfile in the apps XDG_CONFIG_DIR, where the glib keyfile settingsbackend will look for it.
Still to do: Only do this conversion when the app doesn't have dconf sandbox holes anymore, to prevent creating the file prematurely, while the app is still using dconf.
Closes #2648