summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Daniel2013-01-21 06:40:36 (EST)
committer Pascal Rapicault2013-01-22 11:47:22 (EST)
commita34eac29e330a41991d003e2dcd2d8b264d77145 (patch)
treeb38ad7fd022fd6c3e59b3df73719c19e76dda071
parent6981ca8bd3c1db9ab2dd9484a1f7c8950fcd1abe (diff)
downloadrt.equinox.p2-a34eac29e330a41991d003e2dcd2d8b264d77145.zip
rt.equinox.p2-a34eac29e330a41991d003e2dcd2d8b264d77145.tar.gz
rt.equinox.p2-a34eac29e330a41991d003e2dcd2d8b264d77145.tar.bz2
397216: [Shared] Better shared configuration change discovery
Perform dropins reindexing after master configuration had been changed. https://bugs.eclipse.org/bugs/show_bug.cgi?id=397216
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
index 337d41a..d2504c1 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2007, 2013 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -7,11 +7,10 @@
* Contributors:
* IBM Corporation - initial implementation and ideas
* Sonatype, Inc. - ongoing development
+ * RedHat, Inc. - Bug 397216
******************************************************************************/
package org.eclipse.equinox.internal.p2.reconciler.dropins;
-import org.eclipse.equinox.p2.metadata.IRequirement;
-
import java.io.*;
import java.net.*;
import java.util.*;
@@ -56,6 +55,9 @@ public class ProfileSynchronizer {
private static final String CACHE_EXTENSIONS = "org.eclipse.equinox.p2.cache.extensions"; //$NON-NLS-1$
private static final String PIPE = "|"; //$NON-NLS-1$
private static final String EXPLANATION = "org.eclipse.equinox.p2.director.explain"; //$NON-NLS-1$
+
+ private static final String PROP_IGNORE_USER_CONFIGURATION = "eclipse.ignoreUserConfiguration"; //$NON-NLS-1$
+
final IProfile profile;
final Map<String, IMetadataRepository> repositoryMap;
@@ -396,6 +398,12 @@ public class ProfileSynchronizer {
* Read the values of the stored timestamps that we use for caching.
*/
private void readTimestamps() {
+ if (Boolean.TRUE.toString().equalsIgnoreCase(System.getProperty(PROP_IGNORE_USER_CONFIGURATION))) {
+ timestamps = new HashMap<String, String>();
+ Activator.trace("Master profile changed."); //$NON-NLS-1$
+ Activator.trace("Performing reconciliation."); //$NON-NLS-1$
+ return;
+ }
File file = Activator.getContext().getDataFile(TIMESTAMPS_FILE_PREFIX + profile.getProfileId().hashCode());
try {
InputStream is = new BufferedInputStream(new FileInputStream(file));