diff --git a/eclipse-adjust-droplets.patch b/eclipse-adjust-droplets.patch index 9bb1e0a..bf88f61 100644 --- a/eclipse-adjust-droplets.patch +++ b/eclipse-adjust-droplets.patch @@ -50,3 +50,21 @@ index 12e4d89..77945ef 100644 // new magic - multiple info files, f.e. // egit.info (git feature) // cdt.linkĀ (properties file containing link=path) to other info file +diff --git rt.equinox.p2/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java rt.equinox.p2/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java +index 3d7e313..debbfb8 100644 +--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java ++++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java +@@ -238,10 +238,11 @@ public class SurrogateProfileHandler implements ISurrogateProfileHandler { + || "feature".equals(cap.getName())) { //$NON-NLS-1$ + featureOrBundle = true; + } +- } else if (Boolean.TRUE.equals(unit.getProperties().get("org.eclipse.equinox.p2.type.group"))) { //$NON-NLS-1$ +- featureOrBundle = true; + } + } ++ if (Boolean.TRUE.toString().equals(unit.getProperties().get("org.eclipse.equinox.p2.type.group"))) { //$NON-NLS-1$ ++ featureOrBundle = true; ++ } + if (featureOrBundle && !added.contains(unit)) { + added.add(unit); + sharedProfile.addInstallableUnit(unit); diff --git a/eclipse-hide-droplets-from-install-wizard.patch b/eclipse-hide-droplets-from-install-wizard.patch new file mode 100644 index 0000000..85ef057 --- /dev/null +++ b/eclipse-hide-droplets-from-install-wizard.patch @@ -0,0 +1,77 @@ +From 051d84daff808349fc3eb4d44b2f9d56f7fe89ba Mon Sep 17 00:00:00 2001 +From: Roland Grunberg +Date: Wed, 18 Jan 2017 15:51:40 -0500 +Subject: [PATCH] Don't show p2 Droplet locations in the UI. + +Don't show p2 Droplets in the Repository Selection Combo Box, or in the +Available Software Sites preferences. + +Change-Id: I4afddffbaaeae3f33958629eebb32861087a93de +--- + .../internal/p2/ui/dialogs/RepositorySelectionGroup.java | 14 ++++++++++++++ + .../eclipse/equinox/p2/ui/RepositoryManipulationPage.java | 15 ++++++++++++++- + 2 files changed, 28 insertions(+), 1 deletion(-) + +diff --git rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java +index 8d08101..59567c0 100644 +--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java ++++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java +@@ -16,6 +16,7 @@ import java.lang.reflect.InvocationTargetException; + import java.net.URI; + import java.net.URISyntaxException; + import java.util.*; ++import java.util.List; + import org.eclipse.core.runtime.*; + import org.eclipse.equinox.internal.p2.ui.*; + import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext; +@@ -314,6 +315,19 @@ public class RepositorySelectionGroup { + void fillRepoCombo(final String selection) { + RepositoryTracker tracker = ui.getRepositoryTracker(); + URI[] sites = tracker.getKnownRepositories(ui.getSession()); ++ String fragments = System.getProperty("p2.fragments"); ++ List tmp = new ArrayList(Arrays.asList(sites)); ++ if (fragments != null) { ++ String[] rootPaths = fragments.split(","); ++ for (String root : rootPaths) { ++ for (URI uri : sites) { ++ if (uri.getPath() != null && uri.getPath().startsWith(root)) { ++ tmp.remove(uri); ++ } ++ } ++ } ++ } ++ sites = tmp.toArray(new URI[0]); + boolean hasLocalSites = getLocalSites().length > 0; + final String[] items; + if (hasLocalSites) { +diff --git rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java +index c0f2ca1..03515c7 100644 +--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java ++++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java +@@ -130,9 +130,22 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb + if (cachedElements == null) { + Object[] children = super.fetchChildren(o, monitor); + cachedElements = new Hashtable(children.length); ++ String fragments = System.getProperty("p2.fragments"); + for (int i = 0; i < children.length; i++) { + if (children[i] instanceof MetadataRepositoryElement) { +- put((MetadataRepositoryElement) children[i]); ++ if (fragments != null) { ++ String[] rootPaths = fragments.split(","); ++ boolean isDroplet = false; ++ for (String root : rootPaths) { ++ URI childLoc = ((MetadataRepositoryElement)children[i]).getLocation(); ++ if (childLoc.getPath() != null && childLoc.getPath().startsWith(root)) { ++ isDroplet = true; ++ } ++ } ++ if (!isDroplet) { ++ put((MetadataRepositoryElement) children[i]); ++ } ++ } + } + } + } +-- +2.9.3 + diff --git a/eclipse.spec b/eclipse.spec index 1b48f0b..a95886b 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -132,6 +132,9 @@ Patch28: prefer_x11_backend.patch # Fix errors when building ant launcher Patch29: fix_ant_build.patch +# Hide the p2 Droplets from cluttering Install Wizard Combo +Patch30: eclipse-hide-droplets-from-install-wizard.patch + BuildRequires: tycho >= 0.25.0 BuildRequires: tycho-extras >= 0.25.0 BuildRequires: cbi-plugins @@ -394,6 +397,7 @@ tar --strip-components=1 -xf %{SOURCE1} %patch27 %patch28 %patch29 +%patch30 # Use ecj when bootstrapping %if %{bootstrap} @@ -1144,6 +1148,18 @@ fi - Update to Neon.3 - Upstreamed some changes from RHSCL +* Wed Feb 08 2017 Roland Grunberg - 1:4.6.2-7 +- Hide the p2 Droplets from the Available Software Sites listing. +- Guard against null URI path in droplet check for Install Wizard Combo. +- Resolves: rhbz#1413778, rhbz#1420225 + +* Wed Jan 25 2017 Roland Grunberg - 1:4.6.2-6 +- Fix bug in p2 Droplet detection of feature groups. + +* Tue Jan 24 2017 Roland Grunberg - 1:4.6.2-5 +- Hide the p2 Droplets from cluttering Install Wizard Combo. +- Resolves: rhbz#1413778 + * Mon Jan 16 2017 Mat Booth - 1:4.6.2-4 - Fix last javax.annotation reference