Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Kaegi2009-04-22 17:52:57 -0400
committerSimon Kaegi2009-04-22 17:52:57 -0400
commit0f386067c7c87f535be2af98fbffc2c6843d83e4 (patch)
tree3cc5c0ef2a791ffe5339d6a0ac6d16872a1711bb /bundles/org.eclipse.equinox.frameworkadmin.equinox/src
parent5c633128990d30eef6ee73df6b87404ff3a25199 (diff)
downloadrt.equinox.p2-0f386067c7c87f535be2af98fbffc2c6843d83e4.tar.gz
rt.equinox.p2-0f386067c7c87f535be2af98fbffc2c6843d83e4.tar.xz
rt.equinox.p2-0f386067c7c87f535be2af98fbffc2c6843d83e4.zip
Bug 273149 Old style of specifying config.ini properties for osgi.framework and osgi.bundles leads to p2 reconciler problems
Diffstat (limited to 'bundles/org.eclipse.equinox.frameworkadmin.equinox/src')
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java11
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java13
2 files changed, 17 insertions, 7 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
index 60bb5e05c..d7e966cc9 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
@@ -57,7 +57,7 @@ public class EclipseLauncherParser {
URI launcherFolder = launcherData.getLauncher().getParentFile().toURI();
getStartup(lines, launcherFolder);
- // getFrameworkJar(lines, launcherFolder, laubncherData);
+ getFrameworkJar(lines, launcherFolder, launcherData);
URI osgiInstallArea = getOSGiInstallArea(lines, launcherFolder);
if (osgiInstallArea == null) {
osgiInstallArea = launcherData.getFwJar() != null ? launcherData.getFwJar().getParentFile().toURI() : launcherFolder;
@@ -74,6 +74,15 @@ public class EclipseLauncherParser {
Log.log(LogService.LOG_INFO, NLS.bind(Messages.log_configFile, launcherConfigFile.getAbsolutePath()));
}
+ private void getFrameworkJar(List lines, URI launcherFolder, LauncherData launcherData) {
+ File fwJar = launcherData.getFwJar();
+ if (fwJar != null)
+ return;
+ URI location = ParserUtils.getFrameworkJar(lines, launcherFolder);
+ if (location != null)
+ launcherData.setFwJar(URIUtil.toFile(location));
+ }
+
private void getPersistentDataLocation(List lines, URI osgiInstallArea, URI configArea, LauncherData launcherData) {
//TODO The setting of the -clean could only do properly once config.ini has been read
if (launcherData.getFwPersistentDataLocation() == null) {
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
index 78b1c39a1..cdd59f7a8 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
@@ -116,13 +116,14 @@ public class EquinoxFwConfigFileParser {
int indexStartInfo = entry.indexOf('@');
String location = (indexStartInfo == -1) ? entry : entry.substring(0, indexStartInfo);
URI realLocation = null;
- try {
- if (manipulator.getLauncherData().getFwJar() != null) {
- realLocation = URIUtil.makeAbsolute(FileUtils.fromFileURL(location), manipulator.getLauncherData().getFwJar().getParentFile().toURI());
+ if (manipulator.getLauncherData().getFwJar() != null) {
+ File parentFile = manipulator.getLauncherData().getFwJar().getParentFile();
+ try {
+ realLocation = URIUtil.makeAbsolute(FileUtils.fromFileURL(location), parentFile.toURI());
+ } catch (URISyntaxException e) {
+ // try searching as a simple location
+ realLocation = FileUtils.getEclipsePluginFullLocation(location, parentFile);
}
- } catch (URISyntaxException e) {
- Log.log(LogService.LOG_ERROR, "Can't make absolute...");
- continue;
}
String slAndFlag = (indexStartInfo > -1) ? entry.substring(indexStartInfo + 1) : null;

Back to the top