Bug 3653 - Upgrading from Mageia5 default (3.11.1), 3.13.2git tries to load 3.11.1 plugins
Summary: Upgrading from Mageia5 default (3.11.1), 3.13.2git tries to load 3.11.1 plugins
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Plugins (show other bugs)
Version: 3.14.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2016-06-15 20:20 UTC by Pierre Fortin
Modified: 2016-07-05 16:43 UTC (History)
0 users

See Also:


Attachments
CM plugin error dialog (81.81 KB, image/jpeg)
2016-06-15 20:20 UTC, Pierre Fortin
no flags Details
Load plugins accessing 3.11.1 (45.82 KB, image/jpeg)
2016-06-15 20:22 UTC, Pierre Fortin
no flags Details
Load installs 3.13.2 plugin (36.47 KB, image/jpeg)
2016-06-15 20:25 UTC, Pierre Fortin
no flags Details
Do not store full path for plugins in PLUGINDIR. (731 bytes, patch)
2016-06-15 23:01 UTC, Andrej Kacian
no flags Details | Diff

Description Pierre Fortin 2016-06-15 20:20:49 UTC
Created attachment 1661 [details]
CM plugin error dialog

Following up on my daughter's problems getting GMail IMAP working, I upgraded her from Mageia5's CM 3.11.1 to 3.13.2git153.  When starting CM, got an error dialog about plugins.

I can reproduce this situation on my system:
- installed CM 3.11.1 via Mageia5 mcc RPMs.
- started it on a virgin userid
  - used all defaults + Save
- installed a bunch of plugins
- quit CM 3.11.1
- started CM 3.13.2git145 (my current version)
- got error dialog

So it appears CM is trying to load plugins from ‎/usr/lib64/claws-mail/plugins/ instead of /usr/local/lib/claws-mail/plugins/ where build installed them...

Also, shouldn't the build install the plugins in  /usr/local/lib64/claws-mail/plugins/ ?
Comment 1 Pierre Fortin 2016-06-15 20:22:30 UTC
Created attachment 1662 [details]
Load plugins accessing 3.11.1
Comment 2 Pierre Fortin 2016-06-15 20:25:26 UTC
Created attachment 1663 [details]
Load installs 3.13.2 plugin

Looks like CM accesses /usr/lib[64]/claws-mail/plugins/ on initial load; but does load correct plugins from /usr/local/lib/claws-mail/plugins on "Load".
Comment 3 Andrej Kacian 2016-06-15 21:21:54 UTC
Can you please post contents of [Plugins_GTK2] section in your .claws-mail/clawsrc file?
Comment 4 Charles A Edwards 2016-06-15 22:36:34 UTC
When you updated your daughters system to 3.13.2git153 you should have uninstalled
all the Mga5 3.11.1 rpms.

The plugin path is ~./claws-mail will now need to be updated for the new path

PATH in Mga5 will always search /usr/lib64 Before /usr/local/lib if it finds plugins in /usr/lib64/ it will try to load them and not even check /usr/local/lib


The issues you found is not a bug in Claws or even Mga5.
Similar would occur for any app if you have 2 instances of the same app installed using 2 different paths.
Comment 5 Andrej Kacian 2016-06-15 23:01:07 UTC
Created attachment 1664 [details]
Do not store full path for plugins in PLUGINDIR.

Actually, I think there really is a bug. The configuration stores full path for loaded plugins, even if they're in the default plugin directory (which is $PREFIX/claws-mail/plugins, where $PREFIX is usually different for Claws Mail from a distro package, and when compiled from source). That results in the program trying to load wrong plugins on startup.

Attached patch should fix this, although Pierre should either unload all the wrong plugins (in italics) and load the right ones, or edit the mentioned [Plugins_GTK2] section in clawsrc, leaving only e.g. "fancy.so" on each line, instead of full paths. With this patch, the configuration will be saved correctly from that point on, and fancy.so from correct directory will be loaded every time.
Comment 6 Charles A Edwards 2016-06-15 23:15:01 UTC
As long as the 3.11.1 rpms remains on the system the manifest and paths used for
those rpms will remain and the there will exist 2 different prefix_dir depending upon how claws is launched.
Comment 7 Pierre Fortin 2016-06-16 15:47:42 UTC
There is no reason why we can't have different versions of any program.  This is no different from having the /boot/vmlinuz symlink pointing at one of N kernels.

My build script was keeping the previous copy of CM as a backoff option; but I now realize that this was useless since the plugins are over-written.

The distro provided version should not have to be removed for me to run git versions.   Ideally, it would be great to have the ability save one or more previous versions for backoff purposes.

In fact, when running a git version, then building a new version; while the previous plugin files are "replaced" by the newly built ones, Linux will not actually delete the old (now hidden) plugins until their reference counts go to zero (when all instances of their parent CM are stopped).

(In reply to comment #3)
> Can you please post contents of [Plugins_GTK2] section in your
> .claws-mail/clawsrc file?

# Instances 1 & 2 (same; but order differs):
[Plugins_GTK2]
/usr/local/lib/claws-mail/plugins/acpi_notifier.so
/usr/local/lib/claws-mail/plugins/address_keeper.so
/usr/local/lib/claws-mail/plugins/attachwarner.so
/usr/local/lib/claws-mail/plugins/fancy.so
/usr/local/lib/claws-mail/plugins/pdf_viewer.so
/usr/local/lib/claws-mail/plugins/python.so
/usr/local/lib/claws-mail/plugins/libravatar.so
/usr/local/lib/claws-mail/plugins/rssyl.so
/usr/local/lib/claws-mail/plugins/notification.so
/usr/local/lib/claws-mail/plugins/att_remover.so

# Instance 3 (testing only):
[Plugins_GTK2]
pgpcore.so     <===
/usr/local/lib/claws-mail/plugins/acpi_notifier.so
/usr/local/lib/claws-mail/plugins/attachwarner.so
/usr/local/lib/claws-mail/plugins/att_remover.so
/usr/local/lib/claws-mail/plugins/fancy.so
/usr/local/lib/claws-mail/plugins/libravatar.so
/usr/local/lib/claws-mail/plugins/notification.so
/usr/local/lib/claws-mail/plugins/pdf_viewer.so
/usr/local/lib/claws-mail/plugins/smime.so
/usr/local/lib/claws-mail/plugins/tnef_parse.so
/usr/local/lib/claws-mail/plugins/vcalendar.so
/usr/local/lib/claws-mail/plugins/python.so
/usr/lib64/claws-mail/plugins/python.so    <===

The first and last are interesting...
Comment 8 Ricardo Mones 2016-06-30 16:21:59 UTC
Hi,

By default full path of plugins is saved for historical reasons. If you edit some plugin path and make it relative (to binary prefix) it will be kept as is, hence, if you want some plugin to be loaded for the corresponding binary, just edit the rc file and keep only the plugin name.

I'll try to document this after returning back home, it's not fun to type on a phone ;-)

Note You need to log in before you can comment on or make changes to this bug.