summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (Ericsson)2013-05-02 13:54:01 (EDT)
committerPascal Rapicault2013-05-02 13:54:01 (EDT)
commit697de6584f6ae94e4020d92a541a33405ce9181c (patch)
tree4fec7cd091446f5747c2da1b5509fba221691c8a
parent72d4d8ad4ca3e370a4fc2812612b67c13ce9919f (diff)
downloadrt.equinox.p2-697de6584f6ae94e4020d92a541a33405ce9181c.zip
rt.equinox.p2-697de6584f6ae94e4020d92a541a33405ce9181c.tar.gz
rt.equinox.p2-697de6584f6ae94e4020d92a541a33405ce9181c.tar.bz2
Bug 407096 - [shared][migration] Migration should consider files local
to profile migrated from
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationSupport.java10
1 files changed, 9 insertions, 1 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 16eda5a..8098425 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
@@ -12,10 +12,12 @@ package org.eclipse.equinox.internal.p2.ui.sdk.scheduler.migration;
import java.io.File;
import java.net.URI;
import java.util.*;
+import org.eclipse.core.runtime.URIUtil;
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;
import org.eclipse.equinox.internal.p2.ui.sdk.scheduler.*;
+import org.eclipse.equinox.p2.core.IAgentLocation;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProfileRegistry;
@@ -60,6 +62,8 @@ public class MigrationSupport {
return false;
reposToMigrate = ((IMetadataRepositoryManager) otherConfigAgent.getService(IMetadataRepositoryManager.SERVICE_NAME)).getKnownRepositories(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
+ reposToMigrate = Arrays.copyOf(reposToMigrate, reposToMigrate.length + 1);
+ reposToMigrate[reposToMigrate.length - 1] = getURIForProfile(otherConfigAgent, previousProfile);
}
if (previousProfile == null && baseChangedSinceLastPresentationOfWizard(agent, registry, currentProfile))
@@ -77,10 +81,14 @@ public class MigrationSupport {
return true;
}
+ private URI getURIForProfile(IProvisioningAgent agent, IProfile profile) {
+ IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
+ return URIUtil.append(agentLocation.getRootLocation(), "org.eclipse.equinox.p2.engine/profileRegistry/" + profile.getProfileId() + ".profile"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
private File getInstallFolder() {
Location configurationLocation = (Location) ServiceHelper.getService(EngineActivator.getContext(), Location.class.getName(), Location.INSTALL_FILTER);
return new File(configurationLocation.getURL().getPath());
-
}
//The search location is two level up from the configuration location.