From 5e90fab36677a1b2656eaca09c1364f7eb2e28b3 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Aug 19 2016 15:08:11 +0000 Subject: Disable droplets being loaded by the reconciler. - Fix possible NPE in droplet p2.runnable property check. --- diff --git a/eclipse-disable-droplets-in-dropins.patch b/eclipse-disable-droplets-in-dropins.patch new file mode 100644 index 0000000..21fb38c --- /dev/null +++ b/eclipse-disable-droplets-in-dropins.patch @@ -0,0 +1,47 @@ +From edd5a395dd96699f91c463c0e0409a7488814775 Mon Sep 17 00:00:00 2001 +From: Roland Grunberg +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 sites = config.getSites(); + Set newRepos = new LinkedHashSet(); + Set toBeRemoved = new HashSet(); + 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 + diff --git a/eclipse-make-droplets-runnable.patch b/eclipse-make-droplets-runnable.patch index 70b0feb..8fc40d4 100644 --- a/eclipse-make-droplets-runnable.patch +++ b/eclipse-make-droplets-runnable.patch @@ -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 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= 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 - 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 - 1:4.6.0-5 - Improve 'p2.runnable' check in ExtensionLocationArtifactRepository.