Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Kaegi2009-04-22 17:31:19 +0000
committerSimon Kaegi2009-04-22 17:31:19 +0000
commit2887e667cec2d1ea8350c6bbd1b97017efd91634 (patch)
treeb2862a8a30e2a6d3a41d8b0e1e151bb832579855 /bundles
parent7aecc1a97dd71c77f3830c6e15d2091a8acfff63 (diff)
downloadrt.equinox.p2-2887e667cec2d1ea8350c6bbd1b97017efd91634.tar.gz
rt.equinox.p2-2887e667cec2d1ea8350c6bbd1b97017efd91634.tar.xz
rt.equinox.p2-2887e667cec2d1ea8350c6bbd1b97017efd91634.zip
Bug 273276 move {installFolder} initialization from touchpoints to installableunitphase
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitPhase.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/NativeTouchpointTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java1
5 files changed, 7 insertions, 7 deletions
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitPhase.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitPhase.java
index fa7c2feec..8b732683a 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitPhase.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitPhase.java
@@ -20,11 +20,17 @@ import org.eclipse.equinox.internal.provisional.p2.metadata.*;
public abstract class InstallableUnitPhase extends Phase {
public static final String PARM_ARTIFACT = "artifact"; //$NON-NLS-1$
public static final String PARM_IU = "iu"; //$NON-NLS-1$
+ public static final String PARM_INSTALL_FOLDER = "installFolder"; //$NON-NLS-1$
protected InstallableUnitPhase(String phaseId, int weight) {
super(phaseId, weight);
}
+ protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map parameters) {
+ parameters.put(PARM_INSTALL_FOLDER, profile.getProperty(IProfile.PROP_INSTALL_FOLDER));
+ return super.initializePhase(monitor, profile, parameters);
+ }
+
protected IStatus initializeOperand(IProfile profile, Operand operand, Map parameters, IProgressMonitor monitor) {
InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java
index f1f7b7d3f..c8c6e1b1d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java
@@ -48,7 +48,6 @@ public class EclipseTouchpointTest extends AbstractProvisioningTest {
IProfile profile = createProfile("test");
touchpoint.initializePhase(null, profile, "test", parameters);
- assertNull(parameters.get(EclipseTouchpoint.PARM_INSTALL_FOLDER));
Object manipulator = parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
assertNotNull(parameters.get(EclipseTouchpoint.PARM_SOURCE_BUNDLES));
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/NativeTouchpointTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/NativeTouchpointTest.java
index 6197c73bb..032b7b442 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/NativeTouchpointTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/NativeTouchpointTest.java
@@ -12,7 +12,6 @@ package org.eclipse.equinox.p2.tests.touchpoint.natives;
import java.io.File;
import java.util.*;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
import org.eclipse.equinox.internal.p2.touchpoint.natives.NativeTouchpoint;
import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
@@ -34,7 +33,6 @@ public class NativeTouchpointTest extends AbstractProvisioningTest {
IProfile profile = createProfile("test");
touchpoint.initializePhase(null, profile, "test", parameters);
- assertNull(parameters.get(EclipseTouchpoint.PARM_INSTALL_FOLDER));
touchpoint.completePhase(null, profile, "test", parameters);
parameters.clear();
@@ -44,7 +42,6 @@ public class NativeTouchpointTest extends AbstractProvisioningTest {
profile = createProfile("test", null, profileProperties);
touchpoint.initializePhase(null, profile, "test", parameters);
- assertNotNull(parameters.get(EclipseTouchpoint.PARM_INSTALL_FOLDER));
touchpoint.completePhase(null, profile, "test", parameters);
}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
index 1db71d810..830be978b 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
@@ -29,7 +29,7 @@ public class EclipseTouchpoint extends Touchpoint {
public static final String PARM_PLATFORM_CONFIGURATION = "platformConfiguration"; //$NON-NLS-1$
public static final String PARM_SOURCE_BUNDLES = "sourceBundles"; //$NON-NLS-1$
public static final String PARM_IU = "iu"; //$NON-NLS-1$
- public static final String PARM_INSTALL_FOLDER = "installFolder"; //$NON-NLS-1$
+
private static final String NATIVE_TOUCHPOINT_ID = "org.eclipse.equinox.p2.touchpoint.natives"; //$NON-NLS-1$
private static List NATIVE_ACTIONS = Arrays.asList(new String[] {"chmod", "ln", "mkdir", "rmdir"}); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
private static final String VALIDATE_PROFILE = "org.eclipse.equinox.internal.p2.touchpoint.eclipse.validateProfile"; //$NON-NLS-1$
@@ -162,7 +162,6 @@ public class EclipseTouchpoint extends Touchpoint {
}
public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map touchpointParameters) {
- touchpointParameters.put(PARM_INSTALL_FOLDER, Util.getInstallFolder(profile));
LazyManipulator manipulator = getManipulator(profile);
touchpointParameters.put(PARM_MANIPULATOR, manipulator);
touchpointParameters.put(PARM_SOURCE_BUNDLES, getSourceManipulator(profile));
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java
index 163e0de77..ebf7affc7 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java
@@ -26,7 +26,6 @@ public class NativeTouchpoint extends Touchpoint {
private static Map backups = new WeakHashMap();
public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map touchpointParameters) {
- touchpointParameters.put(PARM_INSTALL_FOLDER, Util.getInstallFolder(profile));
touchpointParameters.put(PARM_BACKUP, getBackupStore(profile));
return null;

Back to the top