Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2010-03-16 16:50:51 -0400
committerAndrew Niefer2010-03-16 16:50:51 -0400
commit13b5a15758efe9e2f22403389c1abe9fd639fb27 (patch)
tree22a193984d7790793d4ee97307e7c7270cd84f55 /bundles/org.eclipse.equinox.p2.artifact.repository
parent17ed433cb17b702a2c86080397cd0a5b3c44dc02 (diff)
downloadrt.equinox.p2-13b5a15758efe9e2f22403389c1abe9fd639fb27.tar.gz
rt.equinox.p2-13b5a15758efe9e2f22403389c1abe9fd639fb27.tar.xz
rt.equinox.p2-13b5a15758efe9e2f22403389c1abe9fd639fb27.zip
bug 306056 - UUIDs and packFilesAsSiblings
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.artifact.repository')
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
index 90ce128d6..45afb00f7 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
@@ -335,6 +335,12 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
internal.setRepository(this);
if (isFolderBased(descriptor))
internal.setRepositoryProperty(ARTIFACT_FOLDER, Boolean.TRUE.toString());
+
+ //clear out the UUID if we aren't using the blobstore.
+ if (flatButPackedEnabled(descriptor) && internal.getProperty(ARTIFACT_UUID) != null) {
+ internal.setProperty(ARTIFACT_UUID, null);
+ }
+
if (descriptor instanceof SimpleArtifactDescriptor) {
Map<String, String> repoProperties = ((SimpleArtifactDescriptor) descriptor).getRepositoryProperties();
for (Map.Entry<String, String> entry : repoProperties.entrySet()) {
@@ -666,15 +672,15 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
}
public synchronized URI getLocation(IArtifactDescriptor descriptor) {
+ if (flatButPackedEnabled(descriptor)) {
+ return getLocationForPackedButFlatArtifacts(descriptor);
+ }
+
// if the artifact has a uuid then use it
String uuid = descriptor.getProperty(ARTIFACT_UUID);
if (uuid != null)
return blobStore.fileFor(bytesFromHexString(uuid));
- if (flatButPackedEnabled(descriptor)) {
- return getLocationForPackedButFlatArtifacts(descriptor);
- }
-
try {
// if the artifact is just a reference then return the reference location
if (descriptor instanceof SimpleArtifactDescriptor) {

Back to the top