diff options
author | Tobias Oberlies | 2012-10-11 09:03:46 +0000 |
---|---|---|
committer | Tobias Oberlies | 2012-10-11 09:14:00 +0000 |
commit | 215fa4de1803474efed31be0d5e8357339d0cc59 (patch) | |
tree | 4c03b499bc06df58b83f060bdfce80e71c67147f | |
parent | 17a359869cee9cba2dfc19fcae795903cba73029 (diff) | |
download | rt.equinox.p2-215fa4de1803474efed31be0d5e8357339d0cc59.tar.gz rt.equinox.p2-215fa4de1803474efed31be0d5e8357339d0cc59.tar.xz rt.equinox.p2-215fa4de1803474efed31be0d5e8357339d0cc59.zip |
356561 Revert default of composite loading back to non-atomicv20121011-091400I20121030-0800I20121029-2000I20121029-0800I20121028-2000I20121024-1200I20121024-1130I20121023-0800I20121016-2240I20121016-0800
- There has been a suggestion of how to fix non-atomic loading (i.e.
implement it in a way that network problems are not silently ignored),
so we may keep non-atomic loading as the default.
Bug: 356561 Composite repositories ignores errors when loading children
(errors are treated like missing children)
14 files changed, 14 insertions, 14 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java index 2a8701242..e17405051 100644 --- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java +++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java @@ -40,8 +40,7 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl public static final String PI_REPOSITORY_TYPE = "compositeArtifactRepository"; //$NON-NLS-1$ static final public String PROP_ATOMIC_LOADING = "p2.atomic.composite.loading"; //$NON-NLS-1$ - // by default, require that all children of a composite can be loaded; default may be changed to enforce old behavior (see bug 356561) - static final public boolean ATOMIC_LOADING_DEFAULT = !"false".equals(Activator.getContext().getProperty("eclipse.p2.atomic.composite.loading.default")); //$NON-NLS-1$//$NON-NLS-2$; + static final public boolean ATOMIC_LOADING_DEFAULT = Boolean.parseBoolean(Activator.getContext().getProperty("eclipse.p2.atomic.composite.loading.default")); //$NON-NLS-1$ // keep a list of the child URIs. they can be absolute or relative. they may or may not point // to a valid reachable repo diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java index a1ac23620..ff4d5f28b 100644 --- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java +++ b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java @@ -38,8 +38,7 @@ public class CompositeMetadataRepository extends AbstractMetadataRepository impl static final public String PI_REPOSITORY_TYPE = "compositeMetadataRepository"; //$NON-NLS-1$ static final public String PROP_ATOMIC_LOADING = "p2.atomic.composite.loading"; //$NON-NLS-1$ - // by default, require that all children of a composite can be loaded; default may be changed to enforce old behavior (see bug 356561) - static final public boolean ATOMIC_LOADING_DEFAULT = !"false".equals(Activator.getContext().getProperty("eclipse.p2.atomic.composite.loading.default")); //$NON-NLS-1$//$NON-NLS-2$; + static final public boolean ATOMIC_LOADING_DEFAULT = Boolean.parseBoolean(Activator.getContext().getProperty("eclipse.p2.atomic.composite.loading.default")); //$NON-NLS-1$ static final private Integer REPOSITORY_VERSION = new Integer(1); static final public String XML_EXTENSION = ".xml"; //$NON-NLS-1$ diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java index 23769f6d9..0e329b73c 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java @@ -1386,11 +1386,11 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest { IArtifactRepository repo = null; IArtifactRepositoryManager manager = getArtifactRepositoryManager(); - File repoFile = getTestData("Strict composite with missing child", "/testData/artifactRepo/compositeBadChildren"); + File repoFile = getTestData("Atomic composite with missing child", "/testData/artifactRepo/composite/missingChild/atomicLoading"); URI correctChildURI = URIUtil.append(repoFile.toURI(), "one"); URI repoURI = repoFile.getAbsoluteFile().toURI(); - File alreadyLoadedChildFile = getTestData("Strict composite with missing child", "/testData/artifactRepo/compositeBadChildren/three"); + File alreadyLoadedChildFile = getTestData("Atomic composite with missing child", "/testData/artifactRepo/composite/missingChild/atomicLoading/three"); IArtifactRepository alreadyLoadedChild = manager.loadRepository(alreadyLoadedChildFile.toURI(), null); assertNotNull(alreadyLoadedChild); URI previouslyAddedChildURI = URIUtil.append(repoFile.toURI(), "three"); @@ -1406,7 +1406,7 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest { } assertNull(repo); assertTrue("an exception should have been reported", exception); - assertFalse("Successfully loaded child should be removed when composite loading mode is set to strict", manager.contains(correctChildURI)); + assertFalse("Successfully loaded child should be removed when composite loading mode is set to atomic", manager.contains(correctChildURI)); assertTrue("Periously loaded child should remain in repo manager", manager.contains(previouslyAddedChildURI)); } @@ -1416,7 +1416,7 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest { IArtifactRepository repo = null; IArtifactRepositoryManager manager = getArtifactRepositoryManager(); - File repoFile = getTestData("Composite with missing child", "/testData/artifactRepo/compositeBadChildrenLenient"); + File repoFile = getTestData("Composite with missing child", "/testData/artifactRepo/composite/missingChild/nonAtomicLoading"); URI correctChildURI = URIUtil.append(repoFile.toURI(), "one"); assertFalse("Child should not be available in repo manager", manager.contains(correctChildURI)); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java index e52d7b431..e01be13d1 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java @@ -685,11 +685,11 @@ public class CompositeMetadataRepositoryTest extends AbstractProvisioningTest { IMetadataRepository repo = null; IMetadataRepositoryManager manager = getMetadataRepositoryManager(); - File repoFile = getTestData("Strict composite with missing child", "/testData/metadataRepo/compositeBadChildren"); + File repoFile = getTestData("Atomic composite with missing child", "/testData/metadataRepo/composite/missingChild/atomicLoading"); URI correctChildURI = URIUtil.append(repoFile.toURI(), "one"); URI repoURI = repoFile.getAbsoluteFile().toURI(); - File alreadyLoadedChildFile = getTestData("Strict composite with missing child", "/testData/metadataRepo/compositeBadChildren/three"); + File alreadyLoadedChildFile = getTestData("Atomic composite with missing child", "/testData/metadataRepo/composite/missingChild/atomicLoading/three"); IMetadataRepository alreadyLoadedChild = manager.loadRepository(alreadyLoadedChildFile.toURI(), null); assertNotNull(alreadyLoadedChild); URI previouslyAddedChildURI = URIUtil.append(repoFile.toURI(), "three"); @@ -705,7 +705,7 @@ public class CompositeMetadataRepositoryTest extends AbstractProvisioningTest { } assertNull(repo); assertTrue("an exception should have been reported", exception); - assertFalse("Successfully loaded child should be removed when composite loading mode is set to strict", manager.contains(correctChildURI)); + assertFalse("Successfully loaded child should be removed when composite loading mode is set to atomic", manager.contains(correctChildURI)); assertTrue("Periously loaded child should remain in repo manager", manager.contains(previouslyAddedChildURI)); } @@ -715,7 +715,7 @@ public class CompositeMetadataRepositoryTest extends AbstractProvisioningTest { IMetadataRepository repo = null; IMetadataRepositoryManager manager = getMetadataRepositoryManager(); - File repoFile = getTestData("Composite with missing child", "/testData/metadataRepo/compositeBadChildrenLenient"); + File repoFile = getTestData("Composite with missing child", "/testData/metadataRepo/composite/missingChild/nonAtomicLoading"); URI correctChildURI = URIUtil.append(repoFile.toURI(), "one"); assertFalse("Child should not be available in repo manager", manager.contains(correctChildURI)); diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildren/compositeArtifacts.xml b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/atomicLoading/compositeArtifacts.xml index 72be2b001..8b544dabe 100644 --- a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildren/compositeArtifacts.xml +++ b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/atomicLoading/compositeArtifacts.xml @@ -4,6 +4,7 @@ <properties size='2'> <property name='p2.compressed' value='false'/> <property name='p2.timestamp' value='1234'/> + <property name='p2.atomic.composite.loading' value='true'/> </properties> <children size='3'> <child location='one'/> diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildren/one/artifacts.xml b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/atomicLoading/one/artifacts.xml index 19e55d746..19e55d746 100644 --- a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildren/one/artifacts.xml +++ b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/atomicLoading/one/artifacts.xml diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildren/three/artifacts.xml b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/atomicLoading/three/artifacts.xml index 6c73323c4..6c73323c4 100644 --- a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildren/three/artifacts.xml +++ b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/atomicLoading/three/artifacts.xml diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildrenLenient/compositeArtifacts.xml b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/nonAtomicLoading/compositeArtifacts.xml index e798958bb..cacef3f38 100644 --- a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildrenLenient/compositeArtifacts.xml +++ b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/nonAtomicLoading/compositeArtifacts.xml @@ -4,7 +4,7 @@ <properties size='2'> <property name='p2.compressed' value='false'/> <property name='p2.timestamp' value='1234'/> - <property name='p2.atomic.composite.loading' value='false'/> + <!-- this is the default: <property name='p2.atomic.composite.loading' value='false'/> --> </properties> <children size='2'> <child location='one'/> diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildrenLenient/one/artifacts.xml b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/nonAtomicLoading/one/artifacts.xml index 19e55d746..19e55d746 100644 --- a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildrenLenient/one/artifacts.xml +++ b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/nonAtomicLoading/one/artifacts.xml diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/compositeContent.xml b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/atomicLoading/compositeContent.xml index 1d2b887c4..420982854 100644 --- a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/compositeContent.xml +++ b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/atomicLoading/compositeContent.xml @@ -4,6 +4,7 @@ <properties size='2'> <property name='p2.compressed' value='false'/> <property name='p2.timestamp' value='1234'/> + <property name='p2.atomic.composite.loading' value='true'/> </properties> <children size='3'> <child location='one'/> diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/one/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/atomicLoading/one/content.xml index 41f172f48..41f172f48 100644 --- a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/one/content.xml +++ b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/atomicLoading/one/content.xml diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/three/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/atomicLoading/three/content.xml index 41f172f48..41f172f48 100644 --- a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/three/content.xml +++ b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/atomicLoading/three/content.xml diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildrenLenient/compositeContent.xml b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/nonAtomicLoading/compositeContent.xml index a4e258836..0b3e79484 100644 --- a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildrenLenient/compositeContent.xml +++ b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/nonAtomicLoading/compositeContent.xml @@ -4,7 +4,7 @@ <properties size='2'> <property name='p2.compressed' value='false'/> <property name='p2.timestamp' value='1234'/> - <property name='p2.atomic.composite.loading' value='false'/> + <!-- this is the default: <property name='p2.atomic.composite.loading' value='false'/> --> </properties> <children size='2'> <child location='one'/> diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildrenLenient/one/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/nonAtomicLoading/one/content.xml index 41f172f48..41f172f48 100644 --- a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildrenLenient/one/content.xml +++ b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/nonAtomicLoading/one/content.xml |