Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2011-01-21 13:52:02 -0500
committerAndrew Niefer2011-01-21 13:52:02 -0500
commita35f660dece6ca3dcf9a7c27116ab040fa98fb01 (patch)
tree14bacbd031893366a0b2da6edae3eddab6f3cc7b
parent3644f19fe1ba6b7bb4f726c2caf38621c369c585 (diff)
downloadrt.equinox.p2-a35f660dece6ca3dcf9a7c27116ab040fa98fb01.tar.gz
rt.equinox.p2-a35f660dece6ca3dcf9a7c27116ab040fa98fb01.tar.xz
rt.equinox.p2-a35f660dece6ca3dcf9a7c27116ab040fa98fb01.zip
bug 335042 - Composite repo remove task adds instead of removesv20110121-1730
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java
index 14659399d..f4ccc3f1d 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java
@@ -71,12 +71,17 @@ public class CompositeRepositoryTask extends AbstractRepositoryTask {
public void addConfiguredRemove(RepositoryList list) {
if (list.getRepoLocation() != null) {
RepositoryDescriptor descriptor = new RepositoryDescriptor();
- descriptor.setLocation(list.getRepoLocationURI());
- descriptor.setOptional(list.isOptional());
- if (!list.isBoth()) {
- descriptor.setKind(list.isArtifact() ? RepositoryDescriptor.KIND_ARTIFACT : RepositoryDescriptor.KIND_METADATA);
+ try {
+ //don't use RepositoryList#getRepoLocationURI() because we want relative URIs if they were specified
+ descriptor.setLocation(URIUtil.fromString(list.getRepoLocation()));
+ descriptor.setOptional(list.isOptional());
+ if (!list.isBoth()) {
+ descriptor.setKind(list.isArtifact() ? RepositoryDescriptor.KIND_ARTIFACT : RepositoryDescriptor.KIND_METADATA);
+ }
+ ((CompositeRepositoryApplication) application).removeChild(descriptor);
+ } catch (URISyntaxException e) {
+ // no good, don't remove
}
- ((CompositeRepositoryApplication) application).addChild(descriptor);
}
for (DestinationRepository repo : list.getRepositoryList()) {
((CompositeRepositoryApplication) application).removeChild(repo.getDescriptor());

Back to the top