When uninstalling a plugin with plack enabled, the plugin remains in the list after uninstall has been selected. It only disappears from the list after restarting plack.
Assigning to Jonathan as instructed.
Per an email conversation with Kyle Hall, the following is what appears to be the interaction of plack with plugins: 1) Plugin is installed, install() is run ( install is run anytime a plugin is loaded and the data key "__INSTALLED__" is not set in plugin_data for the plugin 2) Plugin is removed, uninstall is called, which deletes the plugin and tables 3) Page is reloaded, but the plugin is still in memory, install() is called again and tables are recreated, even though the files have been deleted!
Created attachment 66561 [details] [review] Bug 19081: Do not list plugins that have been uninstalled Under plack, can_load should not check if a package is in cache, but reload it. Otherwise plugins that have been uninstalled will still get listed. The error raised by can_load must only be displayed if the plugin has been removed. Test plan: 1/ Upload a plugin 2/ Note the plugin is listed as installed 3/ Modify the package of the plugin to add a compilation error (use 'Foo' for instance) 4/ Reload the page 5/ The plugin is not listed and a warning appear in the logs 6/ Remove the compilation error and uninstall the plugin 7/ The plugin is no longer listed and no warning appear in the logs
Created attachment 66566 [details] [review] Bug 19081: Do not list plugins that have been uninstalled Under plack, can_load should not check if a package is in cache, but reload it. Otherwise plugins that have been uninstalled will still get listed. The error raised by can_load must only be displayed if the plugin has been removed. Test plan: 1/ Upload a plugin 2/ Note the plugin is listed as installed 3/ Modify the package of the plugin to add a compilation error (use 'Foo' for instance) 4/ Reload the page 5/ The plugin is not listed and a warning appear in the logs 6/ Remove the compilation error and uninstall the plugin 7/ The plugin is no longer listed and no warning appear in the logs Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
What is the use of $plugin_file?
Created attachment 66728 [details] [review] Bug 19081: Remove useless $plugin_file variable
(In reply to Nick Clemens from comment #5) > What is the use of $plugin_file? none, it was a previous try. I will squash the patches later.
Created attachment 66736 [details] [review] Bug 19081: Do not list plugins that have been uninstalled Under plack, can_load should not check if a package is in cache, but reload it. Otherwise plugins that have been uninstalled will still get listed. The error raised by can_load must only be displayed if the plugin has been removed. Test plan: 1/ Upload a plugin 2/ Note the plugin is listed as installed 3/ Modify the package of the plugin to add a compilation error (use 'Foo' for instance) 4/ Reload the page 5/ The plugin is not listed and a warning appear in the logs 6/ Remove the compilation error and uninstall the plugin 7/ The plugin is no longer listed and no warning appear in the logs Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 66737 [details] [review] Bug 19081: Remove useless $plugin_file variable Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 17.11, thanks to everybody involved!
I don't see "Remove useless $plugin_file variable" in current master :o
(In reply to Fridolin SOMERS from comment #11) > I don't see "Remove useless $plugin_file variable" in current master :o Patches have been squashed.
Pushed to 17.05.x, will be in 17.05.05.
This patch has been pushed to 16.11.x and will be in 16.11.13.