Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Daniel2013-12-13 15:35:29 +0000
committerKrzysztof Daniel2013-12-17 12:03:36 +0000
commit39da65192fec835fafe75c0f863a63757b59f2dd (patch)
treede0b0b83fc920afcd0e77f1e0b6dcd8113ae6c29 /bundles/org.eclipse.equinox.simpleconfigurator.manipulator
parentefa5443d0d66120dfb2f8f80db365c02b6dbd6d8 (diff)
downloadrt.equinox.p2-39da65192fec835fafe75c0f863a63757b59f2dd.tar.gz
rt.equinox.p2-39da65192fec835fafe75c0f863a63757b59f2dd.tar.xz
rt.equinox.p2-39da65192fec835fafe75c0f863a63757b59f2dd.zip
bug 421935: Extend simpleconfigurator to read .info files from many
locations. Locations should be passed to the simpleconfigurator via the p2.fragments java property and separated using ",". Each location may contain multiple fragments. A fragment consist of a directory shaped as: + extension-parent-dir + extension.info + artifacts.xml + content.xml + plugins/* + features/* Or a link file (f.e. extension.link) which contains a single java property ("link") pointing to another location in the system. The *.info file may contain relative or absolute paths to plugins. Relative paths will be resolved against the extension root. The simpleconfigurator, if configured with extensions, will attempt to load them all at startup, duplicates will be removed. It is the responsibility of the fragment provider to ensure that all fragments will lead to a valid Eclipse installation, AS NO VALIDATION OR INTEGRITY CHECK IS PERFORMED. Bundles that can't be loaded due to unsatisfied constraints will result in errors handled by OSGi (written to the .log in the configuration area). Change-Id: Ib2689c072f3149b29ed77797d7df7b209d9abde7 Signed-off-by: Krzysztof Daniel <kdaniel@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.simpleconfigurator.manipulator')
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
index 7db11a125..b4220492c 100644
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
+++ b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
@@ -8,6 +8,10 @@
*
* Ericsson AB (Pascal Rapicault) - Bug 397216 -[Shared] Better shared
* configuration change discovery
+ *
+ * Red Hat, Inc (Krzysztof Daniel) - Bug 421935: Extend simpleconfigurator to
+ * read .info files from many locations
+ *
*******************************************************************************/
package org.eclipse.equinox.internal.simpleconfigurator.manipulator;
@@ -412,6 +416,7 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
Properties timestampToPersist = new Properties();
timestampToPersist.put(SimpleConfiguratorImpl.KEY_BUNDLESINFO_TIMESTAMP, Long.toString(sharedBundlesInfo.lastModified()));
+ timestampToPersist.put(SimpleConfiguratorImpl.KEY_EXT_TIMESTAMP, Long.toString(SimpleConfiguratorUtils.getExtendedTimeStamp()));
OutputStream os = null;
try {
try {
@@ -577,8 +582,10 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
private boolean hasBaseChanged(URI installArea, File outputFolder) {
String rememberedTimestamp;
+ String extensionTimestsamp;
try {
rememberedTimestamp = (String) loadProperties(new File(outputFolder, SimpleConfiguratorImpl.BASE_TIMESTAMP_FILE_BUNDLESINFO)).get(SimpleConfiguratorImpl.KEY_BUNDLESINFO_TIMESTAMP);
+ extensionTimestsamp = (String) loadProperties(new File(outputFolder, SimpleConfiguratorImpl.BASE_TIMESTAMP_FILE_BUNDLESINFO)).get(SimpleConfiguratorImpl.KEY_EXT_TIMESTAMP);
} catch (IOException e) {
return false;
}
@@ -588,7 +595,7 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
File sharedBundlesInfo = new File(URIUtil.append(installArea, SHARED_BUNDLES_INFO));
if (!sharedBundlesInfo.exists())
return true;
- return !String.valueOf(sharedBundlesInfo.lastModified()).equals(rememberedTimestamp);
+ return !(String.valueOf(sharedBundlesInfo.lastModified()).equals(rememberedTimestamp) && String.valueOf(SimpleConfiguratorUtils.getExtendedTimeStamp()).equals(extensionTimestsamp));
}
private boolean isSharedInstallSetup(File installArea, File outputFile) {

Back to the top