Fix --install-plugin option to preserve real plugin name

This change fixes --install-plugin option to preserve real plugin name when
deployed during Gerrit initialization process.

Currently the plugin is deployed under temporary name, that means that SSH
commands, servlets and REST APIs have to be accessed under temporary name:

  ssh host plugin_replication_130816_2159_3701946857383653266 start --all

Beside that it breaks plugin-owned capabilities, because temporary plugin name
is not a valid git config identifier and can not be stored as capability prefix
in project.config file [1].

[1] https://groups.google.com/forum/#!topic/repo-discuss/bBThzX4gvOo
Change-Id: I86418884201f5e385fbb03253bf2c74116087b32
This commit is contained in:
David Ostrovsky 2013-08-16 22:13:11 +02:00
parent cdbcc65fcd
commit 8691c3920e

View File

@ -117,7 +117,7 @@ public class InitPlugins implements InitStep {
continue;
}
final File p = new File(site.plugins_dir, plugin.pluginFile.getName());
final File p = new File(site.plugins_dir, plugin.name + ".jar");
if (p.exists()) {
final String installedPluginVersion = getVersion(p);
if (!ui.yesno(false,