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 429020 - Python plugin paths are inserted into sys.path in reverse order
Python plugin paths are inserted into sys.path in reverse order
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: Plugins (other)
HEAD
Other All
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-04-12 15:05 UTC by palfrey
Modified: 2007-08-01 15:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes the problem (593 bytes, patch)
2007-04-12 15:06 UTC, palfrey
none Details | Review

Description palfrey 2007-04-12 15:05:03 UTC
rb_python_module_init_python() in plugins/rb-python-module.c calls rb_get_plugin_paths() to get a list of paths to insert into sys.path of the internal python instance. These are in the correct order (user, then system). However, rb_python_module_init_python() then walks the list and inserts each item at the beginning, which has the effect of reversing the list order, making it impossible to override system plugins with user plugins.
Comment 1 palfrey 2007-04-12 15:06:12 UTC
Created attachment 86239 [details] [review]
Fixes the problem

This corrects the problem by creating an "index" variable which is the location to insert items at. It's set to 0 to start with, and gets incremented every time we insert an item.
Comment 2 Jonathan Matthew 2007-05-06 09:42:36 UTC
This problem doesn't seem to have the effect you say it does.  If I create ~/.gnome2/rhythmbox/plugins/lyrics/ it gets loaded before $prefix/lib/rhythmbox/plugins/lyrics.
Comment 3 palfrey 2007-08-01 15:00:17 UTC
Yeah, I can't seem to reproduce this with 0.11.1. Closing.