summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2013-01-22 13:50:05 (EST)
committerPascal Rapicault2013-01-22 13:50:05 (EST)
commitaa6d632dea7ff54e9ba7c3c7f9f2ecd30afe5906 (patch)
tree38e76cca3dd74472aec0c8584ea8a32a549392c6
parent4fb3429ed3fd673d5daf7ca1ce9bf1184a0afcb3 (diff)
downloadrt.equinox.p2-aa6d632dea7ff54e9ba7c3c7f9f2ecd30afe5906.zip
rt.equinox.p2-aa6d632dea7ff54e9ba7c3c7f9f2ecd30afe5906.tar.gz
rt.equinox.p2-aa6d632dea7ff54e9ba7c3c7f9f2ecd30afe5906.tar.bz2
Differentiate initial profile creation from reset.
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java7
1 files changed, 6 insertions, 1 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 c141fa0..e1367ea 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
@@ -244,13 +244,18 @@ public class SimpleProfileRegistry implements IProfileRegistry, IAgentService {
id = self;
Profile profile = getProfileMap().get(id);
if (self != null && self.equals(id)) {
+ boolean resetProfile = false;
if (profile != null && ignoreExistingProfile(profile)) {
internalSetProfileStateProperty(profile, profile.getTimestamp(), "RESET", "RESET");
profile = null;
+ resetProfile = true;
}
if (profile == null) {
profile = createSurrogateProfile(id);
- internalSetProfileStateProperty(profile, profile.getTimestamp(), "NEW", "NEW");
+ if (resetProfile)
+ internalSetProfileStateProperty(profile, profile.getTimestamp(), "NEW", "NEW");
+ else
+ internalSetProfileStateProperty(profile, profile.getTimestamp(), "FIRST", "FIRST");
}
}
return profile;