From 0f4ebc4340094e08d3fb89818d0ce472bc5b16a3 Mon Sep 17 00:00:00 2001 From: Pascal Rapicault (Ericsson) Date: Tue, 5 Feb 2013 20:50:41 -0500 Subject: Check for the presence of the agent registered property --- .../eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java index f5ceb6d6e..503f29756 100644 --- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java +++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java @@ -142,9 +142,6 @@ public class SimpleProfileRegistry implements IProfileRegistry, IAgentService { if (Boolean.valueOf(selfProfile.getProperty(IProfile.PROP_ROAMING)).booleanValue()) changed = updateRoamingProfile(selfProfile); - if (surrogateProfileHandler != null && surrogateProfileHandler.isSurrogate(selfProfile)) - changed = changed || surrogateProfileHandler.updateProfile(selfProfile); - if (changed) saveProfile(selfProfile); } @@ -276,7 +273,7 @@ public class SimpleProfileRegistry implements IProfileRegistry, IAgentService { } private boolean ignoreExistingProfile(IProfile profile) { - if (!Boolean.TRUE.toString().equalsIgnoreCase(System.getProperty(ECLIPSE_IGNORE_USER_CONFIGURATION))) + if (agent.getService(SERVICE_SHARED_INSTALL_NEW_TIMESTAMP) != null) return false; String baseTimestamp = getBaseTimestamp(profile.getProfileId()); @@ -294,6 +291,8 @@ public class SimpleProfileRegistry implements IProfileRegistry, IAgentService { if (installer == null) return null; IProfileRegistry registry = (IProfileRegistry) installer.getService(IProfileRegistry.SERVICE_NAME); + if (registry == null) + return null; long[] revisions = registry.listProfileTimestamps(id); if (revisions.length >= 1) { return Long.toString(revisions[revisions.length - 1]); -- cgit v1.2.3