Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2010-02-08 22:48:34 +0000
committerAndrew Niefer2010-02-08 22:48:34 +0000
commit000bdd1605fd64b7963e3af8d4c5fddabb77f2af (patch)
treef74b489b2c0b7530a9fe3dab8adf4274b7917698 /bundles/org.eclipse.equinox.p2.repository.tools
parentf64be77fe6902710ca12f44bc62b60be6f36dd1b (diff)
downloadrt.equinox.p2-000bdd1605fd64b7963e3af8d4c5fddabb77f2af.tar.gz
rt.equinox.p2-000bdd1605fd64b7963e3af8d4c5fddabb77f2af.tar.xz
rt.equinox.p2-000bdd1605fd64b7963e3af8d4c5fddabb77f2af.zip
bug 301056 - exception with empty baselinev20100208
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository.tools')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
index 574abd9bc..40b2e0163 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.internal.repository.tools;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
@@ -25,8 +23,7 @@ import org.eclipse.equinox.internal.p2.metadata.query.LatestIUVersionQuery;
import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.internal.repository.mirroring.*;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.query.IQueryable;
@@ -197,7 +194,7 @@ public class MirrorApplication extends AbstractApplication implements IApplicati
return mirrorStatus;
}
- private IStatus mirrorArtifacts(IQueryable<IInstallableUnit> slice, IProgressMonitor monitor) throws ProvisionException {
+ private IStatus mirrorArtifacts(IQueryable<IInstallableUnit> slice, IProgressMonitor monitor) {
// Obtain ArtifactKeys from IUs
IQueryResult<IInstallableUnit> ius = slice.query(InstallableUnitQuery.ANY, monitor);
ArrayList<IArtifactKey> keys = new ArrayList<IArtifactKey>();
@@ -228,10 +225,16 @@ public class MirrorApplication extends AbstractApplication implements IApplicati
return result;
}
- private IArtifactRepository initializeBaseline() throws ProvisionException {
+ private IArtifactRepository initializeBaseline() {
if (baseline == null)
return null;
- return addRepository(getArtifactRepositoryManager(), baseline, 0, null);
+ try {
+ return addRepository(getArtifactRepositoryManager(), baseline, 0, null);
+ } catch (ProvisionException e) {
+ if (mirrorLog != null && e.getStatus() != null)
+ mirrorLog.log(e.getStatus());
+ return null;
+ }
}
private void mirrorMetadata(IQueryable<IInstallableUnit> slice, IProgressMonitor monitor) {

Back to the top