summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (Ericsson)2013-05-01 19:54:13 (EDT)
committerPascal Rapicault2013-05-01 19:54:13 (EDT)
commiteec85982094e472aad17ad4f8ba2b74dda888dd7 (patch)
tree50eac1cb2db2251e78a48598a100f25370e26628
parent18340ec61a7c979f3a24f1fc2dc4aab9416573ce (diff)
downloadrt.equinox.p2-eec85982094e472aad17ad4f8ba2b74dda888dd7.zip
rt.equinox.p2-eec85982094e472aad17ad4f8ba2b74dda888dd7.tar.gz
rt.equinox.p2-eec85982094e472aad17ad4f8ba2b74dda888dd7.tar.bz2
[shared][migration] Detect migration when history has not been fixedI20130501-2000
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationSupport.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationSupport.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationSupport.java
index 734ebdc..16eda5a 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationSupport.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationSupport.java
@@ -11,8 +11,7 @@ package org.eclipse.equinox.internal.p2.ui.sdk.scheduler.migration;
import java.io.File;
import java.net.URI;
-import java.util.Iterator;
-import java.util.Set;
+import java.util.*;
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
import org.eclipse.equinox.internal.p2.engine.EngineActivator;
import org.eclipse.equinox.internal.p2.metadata.query.UpdateQuery;
@@ -116,6 +115,10 @@ public class MigrationSupport {
if (isInitial) {
if (getLastMigration() >= history[0])
return false;
+ //This detect the case where the user has not done any migration.
+ Map<String, String> sharedRelatedValues = registry.getProfileStateProperties(currentProfile.getProfileId(), IProfile.STATE_PROP_SHARED_INSTALL);
+ if (sharedRelatedValues.containsValue(IProfile.STATE_SHARED_INSTALL_VALUE_NEW))
+ return false;
return true;
}
return false;