Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2010-09-09 14:38:04 +0000
committerDJ Houghton2010-09-09 14:38:04 +0000
commitba2edd3ba79e660ce96bab02dab8050795019130 (patch)
treeb1080131114da40bd23546c6372af9d430f19bf0 /bundles/org.eclipse.equinox.p2.reconciler.dropins
parent501f93f37e6a02393cc80b086a3623eff1ab0af5 (diff)
downloadrt.equinox.p2-ba2edd3ba79e660ce96bab02dab8050795019130.tar.gz
rt.equinox.p2-ba2edd3ba79e660ce96bab02dab8050795019130.tar.xz
rt.equinox.p2-ba2edd3ba79e660ce96bab02dab8050795019130.zip
Bug 315773 - content.xml is too big (20 MB+)
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.reconciler.dropins')
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Activator.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java4
2 files changed, 20 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Activator.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Activator.java
index 3894dc184..6d5a536bf 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Activator.java
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Activator.java
@@ -70,7 +70,12 @@ public class Activator implements BundleActivator {
throw new IllegalStateException("MetadataRepositoryManager not registered."); //$NON-NLS-1$
ExtensionLocationMetadataRepositoryFactory factory = new ExtensionLocationMetadataRepositoryFactory();
factory.setAgent(agent);
- IMetadataRepository repository = factory.create(location, name, ExtensionLocationMetadataRepository.TYPE, properties);
+ // always compress repositories that we are creating.
+ Map<String, String> repositoryProperties = new HashMap<String, String>();
+ repositoryProperties.put(IRepository.PROP_COMPRESSED, Boolean.TRUE.toString());
+ if (properties != null)
+ repositoryProperties.putAll(properties);
+ IMetadataRepository repository = factory.create(location, name, ExtensionLocationMetadataRepository.TYPE, repositoryProperties);
//we need to add the concrete repository to the repository manager, or its properties will not be correct
((MetadataRepositoryManager) manager).addRepository(repository);
manager.setRepositoryProperty(location, IRepository.PROP_SYSTEM, String.valueOf(true));
@@ -112,7 +117,12 @@ public class Activator implements BundleActivator {
throw new IllegalStateException("ArtifactRepositoryManager not registered."); //$NON-NLS-1$
ExtensionLocationArtifactRepositoryFactory factory = new ExtensionLocationArtifactRepositoryFactory();
factory.setAgent(agent);
- IArtifactRepository repository = factory.create(location, name, ExtensionLocationArtifactRepository.TYPE, properties);
+ // always compress repositories that we are creating.
+ Map<String, String> repositoryProperties = new HashMap<String, String>();
+ repositoryProperties.put(IRepository.PROP_COMPRESSED, Boolean.TRUE.toString());
+ if (properties != null)
+ repositoryProperties.putAll(properties);
+ IArtifactRepository repository = factory.create(location, name, ExtensionLocationArtifactRepository.TYPE, repositoryProperties);
//we need to add the concrete repository to the repository manager, or its properties will not be correct
((ArtifactRepositoryManager) manager).addRepository(repository);
manager.setRepositoryProperty(location, IRepository.PROP_SYSTEM, String.valueOf(true));
@@ -514,7 +524,12 @@ public class Activator implements BundleActivator {
if (directories.isEmpty())
return;
- DropinsRepositoryListener listener = new DropinsRepositoryListener(getAgent(), DROPINS);
+ // we will compress the repositories and mark them hidden as "system" repos.
+ Map<String, String> properties = new HashMap<String, String>();
+ properties.put(IRepository.PROP_COMPRESSED, Boolean.TRUE.toString());
+ properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
+
+ DropinsRepositoryListener listener = new DropinsRepositoryListener(getAgent(), DROPINS, properties);
DirectoryWatcher watcher = new DirectoryWatcher(directories.toArray(new File[directories.size()]));
watcher.addListener(listener);
watcher.poll();
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java
index 642c7f0d2..d2cbd5622 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java
@@ -78,8 +78,8 @@ public class DropinsRepositoryListener extends RepositoryListener {
private boolean optional = false;
}
- public DropinsRepositoryListener(IProvisioningAgent agent, String repositoryName) {
- super(repositoryName, true);
+ public DropinsRepositoryListener(IProvisioningAgent agent, String repositoryName, Map<String, String> properties) {
+ super(repositoryName, properties);
this.agent = agent;
}

Back to the top