[Qgis-developer] the new plugin installer

Martin Dobias wonder.sk at gmail.com
Tue Jun 3 11:59:51 EDT 2008

2008/6/1 Borys Jurgiel <borys at wolf.most.org.pl>:
> Sunday 01 of June 2008 17:32:37 Martin Dobias napisał(a):
>> Thanks for the effort! I've tried finally the plugin installer as
>> you've modified it and looks fine with my few tests.
> Thanks, have you tested it under Windows/Mac? Now it's coming into beta stage,
> but I've tested it mainly under Ubuntu. Could anybody test it under something
> else?

No, I haven't access to Mac and I boot to win just once upon a time.
But I'd like to do some tests there.

>> > We have there 43 plugins and in only 17 cases the name in the repository
>> > and the one inside plugin are the same. Until now it wasn't so important,
>> > but now we will have to pay more attention to the name and version
>> > number, because Installer identifies plugins by the name.
>> This shouldn't be necessary. We can identify plugins by the plugin's
>> directory - it's simple, easy and don't need any changes.
> I can't agree. There is no information in repositories about instalation
> directories. The Installer would have to open every zip file for compare with
> module name, so it would be very slowly!
> Furthermore, even if we had two different plugin names and/or two different
> version numbers, associated by the installation folder name, which name and
> version should I use? And how should I know, when the difference between
> version numbers is due to upgrade in repository, and when due to the
> mistake? :)

I thought that the directory could be easily get from the file_name
element from repository XML but it's not that case. My concern about
not using name of plugin is that these names are likely to be
translated inside the plugin so comparing them won't work well. So, my
suggestion is to add attribute "id" to pyqgis_plugin element which
will be identifier of the plugin and will be the same as the directory
when the plugin resides. What do you think?

>> Looking at your code I see you use python's reload() method to reload
>> the plugin. This doesn't work as expected. The only way how to
>> completely reload some module in python is to delete it first and then
>> import again:
>> del sys.modules['plugin_dir']
>> import plugin_dir
> Great thanks! The reload() was necessary for refreshing version number inside
> Installer, but still I didn't find any way to completely reload the plugin in
> whole QGIS without need of restarting. I understand this way should be
> sufficient?

Yes, this should be sufficient. From my few tests the plugins really
get reloaded completely, without restarting QGIS.

>> Good job, hope to see some further work - especially uninstallation of
>> plugins would be very useful.
> Give me two or three hours! ;) I've done a fair piece of changes already, I'm
> going to submit they in a few hours.



More information about the Qgis-developer mailing list