Disable droplets being loaded by the reconciler.
- Fix possible NPE in droplet p2.runnable property check.
This commit is contained in:
parent
c271131fb2
commit
5e90fab366
|
@ -0,0 +1,47 @@
|
|||
From edd5a395dd96699f91c463c0e0409a7488814775 Mon Sep 17 00:00:00 2001
|
||||
From: Roland Grunberg <rgrunber@redhat.com>
|
||||
Date: Tue, 16 Aug 2016 17:51:46 -0400
|
||||
Subject: [PATCH] Skip loading droplets in the configuration during
|
||||
reconciliation.
|
||||
|
||||
The reconciler attempts to load droplets as extended locations, which
|
||||
seems to be an expensive operation. Avoid doing this for the sake of
|
||||
efficiency.
|
||||
|
||||
Change-Id: Iaf07aacb2d7eaabf3730654e757e69d22f0bc4ab
|
||||
---
|
||||
.../internal/p2/reconciler/dropins/PlatformXmlListener.java | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git rt.equinox.p2/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java rt.equinox.p2/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
|
||||
index 802ee1b..74023fe 100644
|
||||
--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
|
||||
+++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
|
||||
@@ -182,11 +182,24 @@ public class PlatformXmlListener extends DirectoryChangeListener {
|
||||
* Ensure that we have a repository for each site in the given configuration.
|
||||
*/
|
||||
protected void synchronizeConfiguration(Configuration config) {
|
||||
+ String fragments = System.getProperty("p2.fragments");
|
||||
List<Site> sites = config.getSites();
|
||||
Set<IMetadataRepository> newRepos = new LinkedHashSet<IMetadataRepository>();
|
||||
Set<Site> toBeRemoved = new HashSet<Site>();
|
||||
for (Site site : sites) {
|
||||
String siteURL = site.getUrl();
|
||||
+ if (fragments != null) {
|
||||
+ String[] rootPaths = fragments.split(",");
|
||||
+ boolean skip = false;
|
||||
+ for (String path : rootPaths) {
|
||||
+ if (siteURL.startsWith("file:" + path)) {
|
||||
+ skip = true;
|
||||
+ }
|
||||
+ }
|
||||
+ if (skip) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ }
|
||||
IMetadataRepository match = getMatchingRepo(Activator.getRepositories(), siteURL);
|
||||
if (match == null) {
|
||||
try {
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 3e44e317b495f0edc2d9b8b5b9e35415122fb6c9 Mon Sep 17 00:00:00 2001
|
||||
From decc6ec5f3c5ce87fa50c2cfe932d66e89496810 Mon Sep 17 00:00:00 2001
|
||||
From: Roland Grunberg <rgrunber@redhat.com>
|
||||
Date: Wed, 3 Aug 2016 14:57:10 -0400
|
||||
Subject: [PATCH] p2 Droplets should be recognized as runnable repositories.
|
||||
|
@ -12,24 +12,27 @@ are runnable repositories.
|
|||
|
||||
Change-Id: I0ad0a7557f998b4d032466f89e6cc76036d1fb38
|
||||
---
|
||||
.../ExtensionLocationArtifactRepository.java | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
.../ExtensionLocationArtifactRepository.java | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git rt.equinox.p2/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java rt.equinox.p2/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java
|
||||
index 342e33e..760f367 100644
|
||||
index 342e33e..425a166 100644
|
||||
--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java
|
||||
+++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java
|
||||
@@ -260,6 +260,19 @@ public class ExtensionLocationArtifactRepository extends AbstractRepository<IArt
|
||||
@@ -260,6 +260,22 @@ public class ExtensionLocationArtifactRepository extends AbstractRepository<IArt
|
||||
return artifactRepository.getProperties();
|
||||
}
|
||||
|
||||
+ public String getProperty(String key) {
|
||||
+ if (IArtifactRepository.PROP_RUNNABLE.equals(key)) {
|
||||
+ String candidate = getLocation().getPath();
|
||||
+ String[] rootPaths = System.getProperty("p2.fragments").split(",");
|
||||
+ for (String root : rootPaths) {
|
||||
+ if (candidate.startsWith(root)) {
|
||||
+ return Boolean.TRUE.toString();
|
||||
+ String fragments = System.getProperty("p2.fragments");
|
||||
+ if (fragments != null) {
|
||||
+ String[] rootPaths = fragments.split(",");
|
||||
+ for (String root : rootPaths) {
|
||||
+ if (candidate.startsWith(root)) {
|
||||
+ return Boolean.TRUE.toString();
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
|
|
@ -49,7 +49,7 @@ Epoch: 1
|
|||
Summary: An open, extensible IDE
|
||||
Name: eclipse
|
||||
Version: %{eclipse_version}
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
License: EPL
|
||||
URL: http://www.eclipse.org/
|
||||
|
||||
|
@ -126,6 +126,7 @@ Patch23: eclipse-webkit2-by-default.patch
|
|||
Patch24: eclipse-jetty-9.4.patch
|
||||
Patch25: eclipse-popupdialog-color.patch
|
||||
Patch26: eclipse-make-droplets-runnable.patch
|
||||
Patch27: eclipse-disable-droplets-in-dropins.patch
|
||||
|
||||
BuildRequires: tycho >= 0.25.0
|
||||
BuildRequires: tycho-extras >= 0.25.0
|
||||
|
@ -377,6 +378,7 @@ tar --strip-components=1 -xf %{SOURCE1}
|
|||
%endif
|
||||
%patch25
|
||||
%patch26
|
||||
%patch27
|
||||
|
||||
# Resolving the target platform requires too many changes, so don't use it
|
||||
%pom_xpath_remove "pom:configuration/pom:target" eclipse-platform-parent
|
||||
|
@ -1098,6 +1100,10 @@ fi
|
|||
%{_libdir}/eclipse/plugins/org.eclipse.osgi.compatibility.state_*
|
||||
|
||||
%changelog
|
||||
* Thu Aug 18 2016 Roland Grunberg <rgrunber@redhat.com> - 1:4.6.0-6
|
||||
- Disable droplets being loaded by the reconciler.
|
||||
- Fix possible NPE in droplet p2.runnable property check.
|
||||
|
||||
* Fri Aug 05 2016 Roland Grunberg <rgrunber@redhat.com> - 1:4.6.0-5
|
||||
- Improve 'p2.runnable' check in ExtensionLocationArtifactRepository.
|
||||
|
||||
|
|
Loading…
Reference in New Issue