guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#44730] [GAJIM]: Fix loading of installed plugins


From: Raghav Gururajan
Subject: [bug#44730] [GAJIM]: Fix loading of installed plugins
Date: Thu, 19 Nov 2020 15:50:49 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Icedove/78.4.0

Hello Tobias!

Thanks for taking care of Gajim.

Anytime! :-)

Raghav Gururajan 写道:
fix plugins issue in Gajim.

Please provide more information: what was wrong with the original code, and why and how will your patch fix it?  It's better to put this in the commit message itself (above the change log), not just the cover letter (your mail).  No more than a few lines.

The more clear your explanation, the faster the fix can be reviewed and merged.

I keep doing this, my apologies. I have included comment in commit message of revised patch.

I assume that the problem is the empty ‘Plugins’ list when I run:

  $ guix environment guix \
    -- ./pre-inst-env guix environment \
    --pure --ad-hoc gajim{,-openpgp,-omemo} \
    -- gajim

Yes!

However, the fix doesn't look right to me.

After applying your patch, Gajim is broken.  Menus don't work.

--8<---------------cut here---------------start------------->8---
Traceback (most recent call last):
 File  "/gnu/store/zd02xplbafrmzs2swrj3r3zx1hrsvg4y-gajim-1.2.2/lib/python3.8/site-packages/gajim/application.py",  line 222, in _activate
    self.interface.run(self)
 File  "/gnu/store/zd02xplbafrmzs2swrj3r3zx1hrsvg4y-gajim-1.2.2/lib/python3.8/site-packages/gajim/gui_interface.py",  line 1965, in run
    app.plugin_manager = plugins.PluginManager()
 File  "/gnu/store/zd02xplbafrmzs2swrj3r3zx1hrsvg4y-gajim-1.2.2/lib/python3.8/site-packages/gajim/common/helpers.py",  line 1002, in __call__
    cls._instances[cls] = super(Singleton, cls).__call__(
 File  "/gnu/store/zd02xplbafrmzs2swrj3r3zx1hrsvg4y-gajim-1.2.2/lib/python3.8/site-packages/gajim/plugins/pluginmanager.py",  line 224, in __init__
    self._load_plugins()
 File  "/gnu/store/zd02xplbafrmzs2swrj3r3zx1hrsvg4y-gajim-1.2.2/lib/python3.8/site-packages/gajim/plugins/pluginmanager.py",  line 668, in _load_plugins
    for plugin_dir in configpaths.get_plugin_dirs():
 File  "/gnu/store/zd02xplbafrmzs2swrj3r3zx1hrsvg4y-gajim-1.2.2/lib/python3.8/site-packages/gajim/common/configpaths.py",  line 50, in get_plugin_dirs
    Path(os.getenv['PLUGINS_OS']),
--8<---------------cut here---------------end--------------->8---

Sorry, I was misled by a dev. I tries your patch instead now.

I wrote my own patch (attached; no, I don't speak much Python).  I think it fixes the problem but I can't test it.

Thanks! I just tested it. It works. :-)

The plug-ins are found, but won't load with my version of Gajim.

--8<---------------cut here---------------start------------->8---
11/19/20 15:10:01 (W) gajim.plugin_system        Plugin omemo not loaded, newer version of gajim required: 1.2.91 <= 1.2.2 <= 1.3.90 11/19/20 15:10:01 (W) gajim.plugin_system        Plugin openpgp not loaded, newer version of gajim required: 1.2.91 <= 1.2.2 <= 1.3.90
--8<---------------cut here---------------end--------------->8---

This is on current master.  How are these plug-ins expected to be used?

I think you installed plugins, both via guix and via gajim's plugin installer. You should remove one of them.

-       (variable "GAJIM_PLUGIN_PATH")
+       (variable "PLUGINS_OS")

This doesn't look related to the fix at hand.

Why remove GAJIM_?
Why rename _PATH?
TBH, both strike me as unnecessary regressions.
I was discussing with a Gajim Dev. They agreed to merge our patch in Gajim's upstream. So it can be useful for other non-conventional distros as well.

Regards,
RG.

Attachment: 0001-gnu-gajim-Fix-loading-of-os-installed-plugins.patch
Description: Text Data

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]