Skip to content
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

gnome3.evolution-data-server: Hardcode more GSettings schemas #66531

Merged
merged 2 commits into from Aug 12, 2019

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Aug 12, 2019

Geary crashes for me with

![???] 11:06:53 1.424732 GLib-GIO: Settings schema 'org.gnome.evolution-data-server.addressbook' is not installed
fish: “geary” terminated by signal SIGTRAP (Trace or breakpoint trap)

I used Coccinelle to create a base patch:

spatch --sp-file hardcode-gsettings.cocci --dir src/ --in-place

@@
expression GSETTINGS_SCHEMA;
expression settings;
@@
- settings = g_settings_new (GSETTINGS_SCHEMA);
+ GSettingsSchemaSource *schema_source;
+ schema_source = g_settings_schema_source_new_from_directory ("@ESD_GSETTINGS_PATH@",  g_settings_schema_source_get_default (), TRUE, NULL);
+ GSettingsSchema *schema;
+ schema = g_settings_schema_source_lookup (schema_source, GSETTINGS_SCHEMA, FALSE);
+ settings = g_settings_new_full (schema, NULL, NULL);
+ g_settings_schema_source_unref (schema_source);
+ g_settings_schema_unref (schema);

and then manually fixed the conflict & gsettings-desktop-schemas path.

@ofborg ofborg bot added the 6.topic: GNOME GNOME desktop environment and its underlying platform label Aug 12, 2019
@ofborg ofborg bot requested review from hedning and worldofpeace August 12, 2019 15:05
@jtojnar jtojnar force-pushed the eds-hardcode-gschemas branch 2 times, most recently from 22e2be4 to 8984754 Compare August 12, 2019 16:03
@worldofpeace
Copy link
Contributor

I used Coccinelle to create a base patch:

Ooh that's very useful. Is there something like this for python?

I used Coccinelle to create a base patch:

spatch --sp-file hardcode-gsettings.cocci --dir src/ --in-place

```cocci
@@
expression GSETTINGS_SCHEMA;
expression settings;
@@
- settings = g_settings_new (GSETTINGS_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory ("@ESD_GSETTINGS_PATH@",  g_settings_schema_source_get_default (), TRUE, NULL);
+ schema = g_settings_schema_source_lookup (schema_source, GSETTINGS_SCHEMA, FALSE);
+ settings = g_settings_new_full (schema, NULL, NULL);
+ g_settings_schema_source_unref (schema_source);
+ g_settings_schema_unref (schema);
+ }
```
@jtojnar
Copy link
Contributor Author

jtojnar commented Aug 12, 2019

Seems to fix the Geary crashes I encountered.

@worldofpeace
Copy link
Contributor

Seems to fix the Geary crashes I encountered.

Should I do any manual checks on the patches being applied on the source code?

@jtojnar
Copy link
Contributor Author

jtojnar commented Aug 12, 2019

If you have any ideas what to check…

@worldofpeace
Copy link
Contributor

If you have any ideas what to check…

Bet the tests offer enough coverage to see nothing's gone awry.

@jtojnar jtojnar merged commit 9af14d3 into NixOS:master Aug 12, 2019
@jtojnar jtojnar deleted the eds-hardcode-gschemas branch August 12, 2019 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants