GNU bug report logs - #44730
[GAJIM]: Fix loading of installed plugins

Previous Next

Package: guix-patches;

Reported by: Raghav Gururajan <rg <at> raghavgururajan.name>

Date: Wed, 18 Nov 2020 23:46:02 UTC

Severity: normal

Merged with 44728

Full log


Message #16 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Raghav Gururajan <rg <at> raghavgururajan.name>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: Julien Lepiller <julien <at> lepiller.eu>, 44730 <at> debbugs.gnu.org,
 guix-patches <at> gnu.org
Subject: Re: [bug#44730] [GAJIM]: Fix loading of installed plugins
Date: Thu, 19 Nov 2020 15:50:49 -0500
[Message part 1 (text/plain, inline)]
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.
[0001-gnu-gajim-Fix-loading-of-os-installed-plugins.patch (text/x-patch, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

This bug report was last modified 4 years and 206 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.