This issue is due to an upstream (erroneous) change in libpeas 1.24.

The only reference to python loader is at https://github.com/mate-
desktop/pluma/blob/1.22/pluma/pluma-plugins-engine.c#L63

```
pluma/pluma-plugins-engine.c:63
    peas_engine_enable_loader (PEAS_ENGINE (engine), "python");
```

Looking at the blibpeas code here's that function:
https://github.com/GNOME/libpeas/blob/master/libpeas/peas-engine.c#L943

```
libpeas/peas-engine.c:943
 * peas_engine_enable_loader:
```

It still references `python` as Python 2 loader and then it calls
peas_utils_get_loader_id to get loader id by name
https://github.com/GNOME/libpeas/blob/master/libpeas/peas-utils.c#L257

```
libpeas/peas-utils.c:257
peas_utils_get_loader_id (const gchar *loader)
```

That function looks at all_plugin_loaders array with all known loaders
names

```
static const gchar *all_plugin_loaders[] = {
  "c", "lua5.1", "python", "python3"
};
```

The Python 2 loader is still named `python` this means, if we change python 
loader name to python2 in Pluma, libpeas won't find it.

This is where the loader library name was changed without changing the loader 
name in the list of loaders: 
https://github.com/GNOME/libpeas/commit/dabb83a2e217694220a55c2019a081365a4a1288#diff-ad34de593e22ad307274456f3b4724a3


After that, they dropped autotools build files where you can see that the 
library was called libpythonloader in the makefile: 
https://github.com/GNOME/libpeas/commit/eadd10dbdd5b9b6b0488aeb41d4bf1592ba9d5d2#diff-f2abb793309b0ed9d8e63c1e038b1e31

Here is a test case:

```
#include <libpeas/peas-engine.h>

int
main (int argc, char **argv) {
    PeasEngine *engine = peas_engine_get_default ();
    peas_engine_enable_loader (engine, "python2");
    return 0;
}
```

Build the above with:

```
gcc -Wall -o peas-test peas-test.c `pkg-config --cflags libpeas-1.0` 
`pkg-config --libs libpeas-1.0`
```

And run it:

```
$ ./peas-test 
```

You'll get this output:

```
(process:13201): libpeas-WARNING **: 13:25:09.920: Failed to enable unknown 
plugin loader 'python2'
```

And with that, we can confirm that the `python2` loader won't be found
by libpeas and that the debdiff above is the correct way to fix this
issue.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to libpeas in Ubuntu.
https://bugs.launchpad.net/bugs/1846890

Title:
  Pluma: unable to enable plugins External tools, Python Console, Quick
  Open, Snippets) because of missed /usr/lib/x86_64-linux-
  gnu/libpeas-1.0/loaders/libpythonloader.so

Status in libpeas package in Ubuntu:
  Confirmed

Bug description:
  Steps to reproduce:
  1. Install Ubuntu 19.10
  2. Launch Pluma
  3. Go to Edit -> Preferences, switch to Plugins tab
  4. Try enable all plugins by checking their checkmarks

  Expected results:
  * all plugins are enabled without errors or warnings;

  Actual results:
  * plugin(s) are not enabled, show the following errors in `pluma`'s terminal:

  ```
  $ pluma

  (pluma:1685): libpeas-WARNING **: 19:20:59.204: Failed to load module
  'pythonloader': /usr/lib/x86_64-linux-
  gnu/libpeas-1.0/loaders/libpythonloader.so: cannot open shared object
  file: No such file or directory

  (pluma:1685): libpeas-WARNING **: 19:20:59.205: Could not load plugin loader 
'python'
  ```

  Note: in previous releases the `libpythonloader.so` was located in
  libpeas-1.0-python2loader package (see
  
https://packages.ubuntu.com/search?suite=disco&arch=amd64&mode=exactfilename&searchon=contents&keywords=libpythonloader.so
  ) but this file is missed in 19.10 repository.

  ProblemType: Bug
  DistroRelease: Ubuntu 19.10
  Package: pluma 1.22.2-0ubuntu1
  ProcVersionSignature: Ubuntu 5.3.0-13.14-generic 5.3.0
  Uname: Linux 5.3.0-13-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
  ApportVersion: 2.20.11-0ubuntu7
  Architecture: amd64
  CurrentDesktop: MATE
  Date: Sat Oct  5 19:23:02 2019
  InstallationDate: Installed on 2019-10-05 (0 days ago)
  InstallationMedia: Ubuntu-MATE 19.10 "Eoan Ermine" - Beta amd64 (20191004)
  SourcePackage: pluma
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libpeas/+bug/1846890/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to