Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2008-09-17 20:35:45 +0000
committerPascal Rapicault2008-09-17 20:35:45 +0000
commitfe305abbcca1a99678ff60813a46708fb0f8909d (patch)
treece1ed616f82796ad7aa78779d5df0d6bf888e9b1
parent0918abae39fa69890cdbd6591d839b2fc661beb8 (diff)
downloadrt.equinox.p2-R3_4_maintenance_patches.tar.gz
rt.equinox.p2-R3_4_maintenance_patches.tar.xz
rt.equinox.p2-R3_4_maintenance_patches.zip
Bug 247095 - p2 reconciler not deleting lines associated with removed features/plugins/sites from USER-INCLUDE sites in platform.xml from bundles.infoR34x_v20080917R3_4_maintenance_patches
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java34
2 files changed, 25 insertions, 16 deletions
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java
index 992c77620..1088d8458 100644
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java
+++ b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java
@@ -87,8 +87,6 @@ public class SiteListener extends RepositoryListener {
if (contains(list, file))
return false;
} else if (Site.POLICY_USER_INCLUDE.equals(policy)) {
- if (isFeature(file))
- return true;
// we are only interested in plug-ins in the list
if (!contains(list, file))
return false;
@@ -102,11 +100,6 @@ public class SiteListener extends RepositoryListener {
return !isToBeRemoved(file);
}
- private boolean isFeature(File file) {
- String parent = file.getParent();
- return parent != null && parent.endsWith(FEATURES);
- }
-
/*
* Return a boolean value indicating whether or not the feature pointed to
* by the given file is in the update manager's list of features to be
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
index 1e210013b..271fbf956 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
@@ -42,16 +42,32 @@ public class PlatformXmlListener extends DirectoryChangeListener {
private long lastModified = -1l;
private Set configRepositories;
- private String toString(String[] list) {
- if (list == null || list.length == 0)
- return ""; //$NON-NLS-1$
+ private String toString(Feature[] features, String[] list) {
StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < list.length; i++) {
- buffer.append(list[i]);
- if (i + 1 < list.length)
- buffer.append(',');
+ if (features != null) {
+ for (int i = 0; i < features.length; i++) {
+ String featureURL = features[i].getUrl();
+ if (featureURL != null)
+ buffer.append(featureURL).append(',');
+ else {
+ String id = features[i].getId();
+ String version = features[i].getVersion();
+ if (id != null && version != null)
+ buffer.append("features/" + id + "_" + version + "/,"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+ }
}
- return buffer.toString();
+ if (list != null) {
+ for (int i = 0; i < list.length; i++) {
+ buffer.append(list[i]).append(',');
+ if (i + 1 < list.length)
+ buffer.append(',');
+ }
+ }
+ if (buffer.length() == 0)
+ return ""; //$NON-NLS-1$
+
+ return buffer.substring(0, buffer.length() - 1);
}
/*
@@ -179,7 +195,7 @@ public class PlatformXmlListener extends DirectoryChangeListener {
URL location = new URL(eclipseExtensionURL);
Map properties = new HashMap();
properties.put(SiteListener.SITE_POLICY, site.getPolicy());
- properties.put(SiteListener.SITE_LIST, toString(site.getList()));
+ properties.put(SiteListener.SITE_LIST, toString(site.getFeatures(), site.getList()));
properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
// deal with the metadata repository

Back to the top