From 0501f8100d68298830a349b2438dbbd7e8703fbf Mon Sep 17 00:00:00 2001 From: Pascal Rapicault Date: Fri, 14 May 2010 21:22:51 +0000 Subject: *** empty log message *** --- .../internal/p2/director/app/DirectorApplication.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java index 2edc2d9a0..8f400a55f 100644 --- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java +++ b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java @@ -231,8 +231,6 @@ public class DirectorApplication implements IApplication { private IProvisioningAgent targetAgent; private boolean noArtifactRepositorySpecified = false; - private long newProfile = -1; - private ProfileChangeRequest buildProvisioningRequest(IProfile profile, Collection installs, Collection uninstalls) { ProfileChangeRequest request = new ProfileChangeRequest(profile); markRoots(request, installs); @@ -353,7 +351,6 @@ public class DirectorApplication implements IApplication { if (profileProperties != null) putProperties(profileProperties, props); profile = ((IProfileRegistry) targetAgent.getService(IProfileRegistry.SERVICE_NAME)).addProfile(profileId, props); - newProfile = profile.getTimestamp(); } return profile; } @@ -551,7 +548,6 @@ public class DirectorApplication implements IApplication { ProfileChangeRequest request = buildProvisioningRequest(profile, installs, uninstalls); printRequest(request); planAndExecute(profile, context, request); - removeJunkProfile(profile); } finally { // if we were originally were set to be roaming and we changed it, change it back before we return if (wasRoaming && !Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue()) @@ -559,18 +555,6 @@ public class DirectorApplication implements IApplication { } } - private void removeJunkProfile(IProfile profile) { - if (newProfile == -1) - return; - - //Remove the initial profile entry that is created when the profile is first created during a provisioning operation - try { - ((IProfileRegistry) targetAgent.getService(IProfileRegistry.SERVICE_NAME)).removeProfile(profile.getProfileId(), newProfile); - } catch (ProvisionException e) { - LogHelper.log(new Status(IStatus.OK, Activator.ID, NLS.bind(Messages.could_not_remove_initialProfile, profile.getProfileId()))); - } - } - private void planAndExecute(IProfile profile, ProvisioningContext context, ProfileChangeRequest request) throws CoreException { IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor()); IStatus operationStatus = result.getStatus(); -- cgit v1.2.1