Steps to reproduce:
- restore from backup for the first time with "restore plugins" checked (just to ensure we have a starting configuration)
- restoring the same backup for the second time with "restore plugins" checked (so the list of plugins in installedPlugins.xml fully matches the list of currently installed plugins)
The log shows messages like "Plugin is already installed, please check manually".
And the plugin hangs.
Debugging shows that in HudsonRestore -> restorePlugins there is a "while" loop which checks if all plugins from pluginRestoreJobs ArrayList have finished installing.
But when all plugins from backup are already installed, the ArrayList pluginRestoreJobs will be empty, and the "while" loop never breaks.
I hope my explanation makes sense