提交 52f18562 编写于 作者: O Olivier Lamy

Merge pull request #598 from evernat/master

[FIXED JENKINS-10569] When installing plugins with overlapping dependencies, Jenkins downloads the duplicate plugins multiple times
......@@ -678,8 +678,13 @@ public class UpdateSite {
Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
UpdateCenter uc = Jenkins.getInstance().getUpdateCenter();
for (Plugin dep : getNeededDependencies()) {
LOGGER.log(Level.WARNING, "Adding dependent install of " + dep.name + " for plugin " + name);
dep.deploy(dynamicLoad);
UpdateCenter.InstallationJob job = uc.getJob(dep);
if (job == null || job.status instanceof UpdateCenter.DownloadJob.Failure) {
LOGGER.log(Level.WARNING, "Adding dependent install of " + dep.name + " for plugin " + name);
dep.deploy(dynamicLoad);
} else {
LOGGER.log(Level.WARNING, "Dependent install of " + dep.name + " for plugin " + name + " already added, skipping");
}
}
return uc.addJob(uc.new InstallationJob(this, UpdateSite.this, Jenkins.getAuthentication(), dynamicLoad));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册