2016-08-18 15:28:27 +00:00
|
|
|
From decc6ec5f3c5ce87fa50c2cfe932d66e89496810 Mon Sep 17 00:00:00 2001
|
2015-11-03 17:04:47 +00:00
|
|
|
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.
|
|
|
|
|
|
|
|
Normally, a runnable repository is identified by the 'p2.runnable'
|
|
|
|
property contained within the artifact repository (artifact.xml).
|
|
|
|
However, in Fedora we ship p2 Droplets without this file so we need a
|
|
|
|
way to let methods like getRunnableRepositories in
|
|
|
|
o.e.equinox.internal.p2.touchpoint.eclipse.Util know that p2 Droplets
|
|
|
|
are runnable repositories.
|
|
|
|
|
|
|
|
Change-Id: I0ad0a7557f998b4d032466f89e6cc76036d1fb38
|
|
|
|
---
|
2016-08-18 15:28:27 +00:00
|
|
|
.../ExtensionLocationArtifactRepository.java | 16 ++++++++++++++++
|
|
|
|
1 file changed, 16 insertions(+)
|
2015-11-03 17:04:47 +00:00
|
|
|
|
|
|
|
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
|
2016-08-18 15:28:27 +00:00
|
|
|
index 342e33e..425a166 100644
|
2015-11-03 17:04:47 +00:00
|
|
|
--- 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
|
2016-08-18 15:28:27 +00:00
|
|
|
@@ -260,6 +260,22 @@ public class ExtensionLocationArtifactRepository extends AbstractRepository<IArt
|
2015-11-03 17:04:47 +00:00
|
|
|
return artifactRepository.getProperties();
|
|
|
|
}
|
|
|
|
|
|
|
|
+ public String getProperty(String key) {
|
2016-08-05 16:38:22 +00:00
|
|
|
+ if (IArtifactRepository.PROP_RUNNABLE.equals(key)) {
|
|
|
|
+ String candidate = getLocation().getPath();
|
2016-08-18 15:28:27 +00:00
|
|
|
+ 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();
|
|
|
|
+ }
|
2015-11-03 17:04:47 +00:00
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return super.getProperty(key);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
public String setProperty(String key, String value, IProgressMonitor monitor) {
|
|
|
|
try {
|
|
|
|
ensureInitialized();
|
|
|
|
--
|
|
|
|
2.7.4
|
|
|
|
|