Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/RepoTasksTests.java5
2 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java
index 566e522a1..447f605b0 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java
@@ -81,7 +81,7 @@ public class RemoveIUTask extends AbstractRepositoryTask {
}
//we will only remove the metadata if all artifacts were removed
- boolean removeMetadata = true;
+ boolean removeMetadata = (filter != null ? keys.size() > 0 : true);
for (IArtifactKey key : keys) {
if (filter == null) {
artifacts.removeDescriptor(key);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/RepoTasksTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/RepoTasksTests.java
index 037c23683..64588efaa 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/RepoTasksTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ant/RepoTasksTests.java
@@ -55,6 +55,10 @@ public class RepoTasksTests extends AbstractAntProvisioningTest {
AntTaskElement removeIU = new AntTaskElement(REMOVE_IU_TASK);
removeIU.addElement(getRepositoryElement(destinationRepo, TYPE_BOTH));
removeIU.addElement(getIUElement("anotherplugin", null));
+ AntTaskElement iuElement = new AntTaskElement("iu");
+ iuElement.addAttribute("query", "");
+ iuElement.addAttribute("artifacts", "(format=packed)");
+ removeIU.addElement(iuElement);
addTask(removeIU);
runAntTask();
@@ -62,6 +66,7 @@ public class RepoTasksTests extends AbstractAntProvisioningTest {
IMetadataRepository metadata = loadMetadataRepository(destinationRepo);
IInstallableUnit iu = getIU(metadata, "anotherplugin");
assertNull(iu);
+ assertNotNull(getIU(metadata, "anotherfeature.feature.group"));
IArtifactRepository artifacts = getArtifactRepositoryManager().loadRepository(destinationRepo, null);
IQueryResult keys = artifacts.query(new ArtifactKeyQuery(null, "anotherplugin", null), null);

Back to the top