After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 755383 - Add a GError to PeasEngine::load-plugin
Add a GError to PeasEngine::load-plugin
Product: libpeas
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: libpeas-maint
Depends on:
Reported: 2015-09-22 06:45 UTC by Garrett Regier
Modified: 2018-05-22 12:14 UTC
See Also:
GNOME target: ---
GNOME version: ---

Add PeasEngine::load-plugin-with-error (10.02 KB, patch)
2015-09-22 06:52 UTC, Garrett Regier
none Details | Review
Add PeasEngine::load-plugin-with-error (14.23 KB, patch)
2015-11-21 03:54 UTC, Garrett Regier
none Details | Review
Added peas_plugin_info_set_error() (5.40 KB, patch)
2015-11-21 20:33 UTC, Garrett Regier
none Details | Review

Description Garrett Regier 2015-09-22 06:45:34 UTC
This would allow the PeasPluginInfo's GError to be supplied by anyone connecting to this signal. This would be useful if the plugin is invalid in some way that the client can determine.
Comment 1 Garrett Regier 2015-09-22 06:52:37 UTC
Created attachment 311828 [details] [review]
Add PeasEngine::load-plugin-with-error

This still needs some tests.
Comment 2 Garrett Regier 2015-11-21 03:54:13 UTC
Created attachment 316003 [details] [review]
Add PeasEngine::load-plugin-with-error

This allows a plugin's GError to be supplied by connecting to this signal.


This includes a full set of tests. This feature might be a good way for users to check for version information instead of libpeas.
Comment 3 Garrett Regier 2015-11-21 20:33:17 UTC
Created attachment 316028 [details] [review]
Added peas_plugin_info_set_error()

This is an alternative approach that avoids dealing with a new signal and allows applications to set a plugin's error at any time, not just upon loading.
Comment 4 Igor Gnatenko 2016-10-03 17:38:00 UTC
It would be very nice to get this in libpeas, as I have use-case. In RPM we have plugin for inhibit systemd:
static rpmRC systemd_inhibit_init(rpmPlugin plugin, rpmts ts)
    struct stat st;

    if (lstat("/run/systemd/system/", &st) == 0) {
        if (S_ISDIR(st.st_mode)) {
            return RPMRC_OK;

    return RPMRC_NOTFOUND;

Actually on activate() it would check if directory exists, if not - disable plugin.
Comment 5 GNOME Infrastructure Team 2018-05-22 12:14:40 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: