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
glib-networking: clean up & add installed tests #67957
Conversation
jtojnar
commented
Sep 2, 2019
•
edited
edited
- built glib-networking
- ran glib-networking.tests
- checked that nothing relies on the dependencies formerly propagated (nix-review?)
auto_features are now enabled by default.
* Add maintainers * Add homepage * Correct license as per https://gitlab.gnome.org/GNOME/glib-networking/commit/b9c0324376a5e23b5f8210b0dd76858206baef26
This was done from the beginning for no apparent reason: NixOS@cc6ecae
So that this can be loaded from programs not depending on gsettings-desktop-schemas. Currently, this patch is much uglier than it could be due to https://gitlab.gnome.org/GNOME/glib/issues/1884
60dbad9
to
d531045
Compare
find "$installedTests/libexec" -type f -executable -print0 \ | ||
| while IFS= read -r -d "" file; do | ||
echo "Wrapping program '$file'" | ||
wrapProgram "$file" --prefix GIO_EXTRA_MODULES : "$out/lib/gio/modules" |
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 just the gio modules? Couldn't we use wrapGAppsHook
, disable it, and wrap them with its args?
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.
I do not want to introduce dependencies on GTK, librsvg etc.
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.
Right, can we make note of that so someone doesn't refactor it to this down the line?
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.
Can we fix the assumptions about wrapGAppsHook
instead? It even has apps in the name.
I really need to finish #43150
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.
I really need to finish #43150
I do have notes locally on some things I wanted to add to #43150 but documentation writing escapes me also.
Though it would be good, just even as a start, to merge the parts about wrapGAppsHook
which I believe was your original intent with this.
Can we fix the assumptions about wrapGAppsHook instead? It even has apps in the name.
When you say "it has apps in the name", it's confusing when it would be used for executables in a library?
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.
I do have notes locally on some things I wanted to add to #43150 but documentation writing escapes me also.
I guess I will try to work on I today.
Though it would be good, just even as a start, to merge the parts about wrapGAppsHook which I believe was your original intent with this.
Yeah keeping the scope narrow will make it easier to consider it mergeable. It is just bad that the wrapper connects so much stuff.
When you say "it has apps in the name", it's confusing when it would be used for executables in a library?
For me, an app is primarily a graphical program that a person can use to carry out some task. Though there can be console apps for which we would not want to depend on GTK either. I would not consider such helper of library to be an app.
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.
I do have notes locally on some things I wanted to add to #43150 but documentation writing escapes me also.
I guess I will try to work on I today.
Though it would be good, just even as a start, to merge the parts about wrapGAppsHook which I believe was your original intent with this.
Yeah keeping the scope narrow will make it easier to consider it mergeable. It is just bad that the wrapper connects so much stuff.
Great, I'd be happy to follow up on it once it's merged. And our roadmap can include what needs to be documented in the future.
Huh, why does
(in passthru) |
Hmm, maybe we can use Also, I think |
I suspect that is because we cannot add wrappers to libraries and we wanted to add TLS support to libsoup. |
Yeah looking through the reverse dependencies there do not seem to be any obvious issues. |
They use |
We no longer propagate dependencies so the comment is not relevant.
Add GSettings schemas required for GNOME helper.
d531045
to
0aa934a
Compare
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.
Builds and tests passes.
By the way, I used Coccinelle to create a base patch here as well:
@r1@
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 ("@gds_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);
+ } Due to this GLib bug, I had to use a second patch: @r2@
expression CHILD_SCHEMA;
expression settings;
expression parent_settings;
@@
- settings = g_settings_get_child (parent_settings, CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory ("@gds_gsettings_path@", g_settings_schema_source_get_default (), TRUE, NULL);
+ schema = g_settings_schema_source_lookup (schema_source, CHILD_SCHEMA, FALSE);
+ settings = g_settings_new_full (schema, NULL, NULL);
+ g_settings_schema_source_unref (schema_source);
+ g_settings_schema_unref (schema);
+ } and then had to modify the files with |