Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 137943 Details for
Bug 274025
[publisher] p2 metadata generator does not scale
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch to fix metadata generator in Galileo (based on HEAD)
p2-metadata-generator-explicit-save-R35RC3.patch (text/plain), 6.54 KB, created by
Sean Flanigan
on 2009-06-01 23:54:58 EDT
(
hide
)
Description:
Patch to fix metadata generator in Galileo (based on HEAD)
Filename:
MIME Type:
Creator:
Sean Flanigan
Created:
2009-06-01 23:54:58 EDT
Size:
6.54 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.p2.artifact.repository >Index: src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java,v >retrieving revision 1.81 >diff -u -r1.81 SimpleArtifactRepository.java >--- src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java 14 May 2009 18:51:28 -0000 1.81 >+++ src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java 2 Jun 2009 03:25:51 -0000 >@@ -211,6 +211,8 @@ > > private MirrorSelector mirrors; > >+ private boolean disableImplicitSave = false; >+ > static void delete(File toDelete) { > if (toDelete.isFile()) { > toDelete.delete(); >@@ -227,6 +229,11 @@ > } > } > >+ public void explicitSave() { >+ boolean compress = "true".equalsIgnoreCase((String) properties.get(PROP_COMPRESSED)); //$NON-NLS-1$ >+ save(compress); >+ } >+ > public static URI getActualLocation(URI base, boolean compress) throws IOException { > return getActualLocation(base, compress ? JAR_EXTENSION : XML_EXTENSION); > } >@@ -298,6 +305,7 @@ > initializeMapper(); > } > } >+ this.disableImplicitSave = Boolean.parseBoolean((String) properties.get(IArtifactRepository.DISABLE_IMPLICIT_SAVE)); > } > save(); > } >@@ -877,8 +885,8 @@ > } > > public void save() { >- boolean compress = "true".equalsIgnoreCase((String) properties.get(PROP_COMPRESSED)); //$NON-NLS-1$ >- save(compress); >+ if (!disableImplicitSave) >+ explicitSave(); > } > > public void save(boolean compress) { >Index: src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepository.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepository.java,v >retrieving revision 1.9 >diff -u -r1.9 IArtifactRepository.java >--- src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepository.java 29 Apr 2009 16:18:37 -0000 1.9 >+++ src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepository.java 2 Jun 2009 03:25:51 -0000 >@@ -36,6 +36,12 @@ > public static int CODE_RETRY = 13; > > /** >+ * Setting this property to true tells the repository that it shouldn't >+ * save changes unless requested via the explicitSave() method. >+ */ >+ public static final String DISABLE_IMPLICIT_SAVE = "p2.disable.implicit.save"; //$NON-NLS-1$ >+ >+ /** > * Add the given descriptor to the set of descriptors in this repository. This is > * a relatively low-level operation that should be used only when the actual related > * content is in this repository and the given descriptor accurately describes >@@ -130,4 +136,10 @@ > */ > public void removeDescriptor(IArtifactKey key); > >+ /** >+ * Save any outstanding changes. If DISABLE_IMPLICIT_SAVE is not configured for this repository, >+ * this may be a no-op. >+ */ >+ public void explicitSave(); >+ > } >Index: src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/AbstractArtifactRepository.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/AbstractArtifactRepository.java,v >retrieving revision 1.9 >diff -u -r1.9 AbstractArtifactRepository.java >--- src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/AbstractArtifactRepository.java 29 Apr 2009 16:18:37 -0000 1.9 >+++ src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/AbstractArtifactRepository.java 2 Jun 2009 03:25:51 -0000 >@@ -59,6 +59,12 @@ > assertModifiable(); > } > >+ public void explicitSave() { >+ // Subclasses which implement DISABLE_IMPLICIT_SAVE must override to save at this point. >+ // Other repositories needn't do anything, since implicit saves will happen when >+ // anything changes. >+ } >+ > public boolean equals(Object o) { > if (this == o) { > return true; >#P org.eclipse.equinox.p2.metadata.generator >Index: src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java,v >retrieving revision 1.48 >diff -u -r1.48 EclipseGeneratorApplication.java >--- src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java 20 May 2009 04:10:55 -0000 1.48 >+++ src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java 2 Jun 2009 03:25:53 -0000 >@@ -10,8 +10,6 @@ > *******************************************************************************/ > package org.eclipse.equinox.internal.p2.metadata.generator; > >-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository; >- > import java.io.File; > import java.net.URI; > import java.net.URISyntaxException; >@@ -33,6 +31,7 @@ > import org.eclipse.equinox.internal.provisional.p2.metadata.generator.Generator; > import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository; > import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager; >+import org.eclipse.equinox.internal.provisional.p2.repository.IRepository; > import org.eclipse.osgi.util.NLS; > import org.osgi.framework.ServiceRegistration; > >@@ -110,8 +109,9 @@ > URI location = artifactLocation; > > String repositoryName = (artifactRepoName != null && artifactRepoName.length() > 0) ? artifactRepoName : artifactLocation + " - artifacts"; //$NON-NLS-1$ >- Map properties = new HashMap(1); >+ Map properties = new HashMap(5); > properties.put(IRepository.PROP_COMPRESSED, compress); >+ properties.put(IArtifactRepository.DISABLE_IMPLICIT_SAVE, "true"); //$NON-NLS-1$ > if (provider.reuseExistingPack200Files()) > properties.put(PUBLISH_PACK_FILES_AS_SIBLINGS, Boolean.TRUE.toString()); > IArtifactRepository result = null; >@@ -378,6 +378,7 @@ > generator.setIncrementalResult(incrementalResult); > generator.setGenerateRootIU(generateRootIU); > IStatus result = generator.generate(); >+ provider.getArtifactRepository().explicitSave(); > incrementalResult = null; > return result; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 274025
:
135911
|
135912
|
137885
|
137943
|
137945
|
150051
|
150052
|
150882
|
150883
|
157998
|
158248