View | Details | Raw Unified | Return to bug 330463 | Differences between
and this patch

Collapse All | Expand All

(-)META-INF/MANIFEST.MF (-1 / +2 lines)
Lines 19-25 Link Here
19
   org.eclipse.equinox.p2.operations,
19
   org.eclipse.equinox.p2.operations,
20
   org.eclipse.equinox.p2.publisher,
20
   org.eclipse.equinox.p2.publisher,
21
   org.eclipse.equinox.p2.ql,
21
   org.eclipse.equinox.p2.ql,
22
   org.eclipse.equinox.p2.ui",
22
   org.eclipse.equinox.p2.ui,
23
   org.eclipse.equinox.p2.touchpoint.eclipse",
23
 org.eclipse.equinox.internal.p2.metadata.expression;
24
 org.eclipse.equinox.internal.p2.metadata.expression;
24
  x-friends:="org.eclipse.equinox.p2.artifact.repository,
25
  x-friends:="org.eclipse.equinox.p2.artifact.repository,
25
   org.eclipse.equinox.p2.directorywatcher,
26
   org.eclipse.equinox.p2.directorywatcher,
(-)src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryIO.java (-6 / +3 lines)
Lines 11-21 Link Here
11
 *******************************************************************************/
11
 *******************************************************************************/
12
package org.eclipse.equinox.internal.p2.metadata.repository;
12
package org.eclipse.equinox.internal.p2.metadata.repository;
13
13
14
import org.eclipse.equinox.p2.repository.IRepositoryReference;
15
16
import org.eclipse.equinox.p2.query.QueryUtil;
17
18
19
import java.io.*;
14
import java.io.*;
20
import java.lang.reflect.Constructor;
15
import java.lang.reflect.Constructor;
21
import java.net.MalformedURLException;
16
import java.net.MalformedURLException;
Lines 32-37 Link Here
32
import org.eclipse.equinox.p2.core.IProvisioningAgent;
27
import org.eclipse.equinox.p2.core.IProvisioningAgent;
33
import org.eclipse.equinox.p2.core.ProvisionException;
28
import org.eclipse.equinox.p2.core.ProvisionException;
34
import org.eclipse.equinox.p2.metadata.*;
29
import org.eclipse.equinox.p2.metadata.*;
30
import org.eclipse.equinox.p2.query.QueryUtil;
31
import org.eclipse.equinox.p2.repository.IRepositoryReference;
35
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
32
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
36
import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
33
import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
37
import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository.RepositoryState;
34
import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository.RepositoryState;
Lines 107-113 Link Here
107
		// A format version number for metadata repository XML.
104
		// A format version number for metadata repository XML.
108
		public static final Version COMPATIBLE_VERSION = Version.createOSGi(1, 0, 0);
105
		public static final Version COMPATIBLE_VERSION = Version.createOSGi(1, 0, 0);
109
		public static final Version CURRENT_VERSION = Version.createOSGi(1, 1, 0);
106
		public static final Version CURRENT_VERSION = Version.createOSGi(1, 1, 0);
110
		public static final VersionRange XML_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, Version.createOSGi(2, 0, 0), false);
107
		public static final VersionRange XML_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, Version.createOSGi(3, 0, 0), false);
111
108
112
		// Constants for processing Instructions
109
		// Constants for processing Instructions
113
		public static final String PI_REPOSITORY_TARGET = "metadataRepository"; //$NON-NLS-1$
110
		public static final String PI_REPOSITORY_TARGET = "metadataRepository"; //$NON-NLS-1$
(-)src/org/eclipse/equinox/p2/tests/metadata/IUPersistenceTest.java (-1 / +1 lines)
Lines 135-141 Link Here
135
	private static IMatchExpression<IInstallableUnit> filter = InstallableUnit.parseFilter("(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))"); // not really
135
	private static IMatchExpression<IInstallableUnit> filter = InstallableUnit.parseFilter("(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))"); // not really
136
	private static String id = "org.eclipse.osgi.services";
136
	private static String id = "org.eclipse.osgi.services";
137
137
138
	private static String[][] instructions = new String[][] {new String[] {"manifest", "Manifest-Version: 1.0\\Bundle-Vendor: Eclipse.org\\Bundle-ContactAddress: www.eclipse.org\\...a whole bunch of other manifest content..."}, new String[] {"zipped", "true"}, //
138
	private static String[][] instructions = new String[][] {new String[] {"zipped", "true"}, //
139
			new String[] {"configure", "addProgramArg(programArg:-startup);addProgramArg(programArg:@artifact);"}}; //
139
			new String[] {"configure", "addProgramArg(programArg:-startup);addProgramArg(programArg:@artifact);"}}; //
140
140
141
	private static String IU_TEST_ELEMENT = "test";
141
	private static String IU_TEST_ELEMENT = "test";
(-)src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/MarkStartedActionTest.java (-3 / +3 lines)
Lines 75-81 Link Here
75
		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
75
		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
76
		assertNotNull(manipulator);
76
		assertNotNull(manipulator);
77
77
78
		BundleInfo bundleInfo = Util.createBundleInfo(osgiTarget, Util.getManifest(iu.getTouchpointData()));
78
		BundleInfo bundleInfo = Util.createBundleInfo(osgiTarget, iu);
79
		manipulator.getConfigData().addBundle(bundleInfo);
79
		manipulator.getConfigData().addBundle(bundleInfo);
80
		assertTrue(isMarkedStarted(manipulator, osgiTarget, false));
80
		assertTrue(isMarkedStarted(manipulator, osgiTarget, false));
81
81
Lines 121-127 Link Here
121
		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
121
		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
122
		assertNotNull(manipulator);
122
		assertNotNull(manipulator);
123
123
124
		BundleInfo bundleInfo = Util.createBundleInfo(osgiTarget, Util.getManifest(iu.getTouchpointData()));
124
		BundleInfo bundleInfo = Util.createBundleInfo(osgiTarget, iu);
125
		manipulator.getConfigData().addBundle(bundleInfo);
125
		manipulator.getConfigData().addBundle(bundleInfo);
126
		assertTrue(isMarkedStarted(manipulator, osgiTarget, false));
126
		assertTrue(isMarkedStarted(manipulator, osgiTarget, false));
127
127
Lines 170-176 Link Here
170
		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
170
		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
171
		assertNotNull(manipulator);
171
		assertNotNull(manipulator);
172
172
173
		BundleInfo bundleInfo = Util.createBundleInfo(osgiTarget, Util.getManifest(iu.getTouchpointData()));
173
		BundleInfo bundleInfo = Util.createBundleInfo(osgiTarget, iu);
174
		manipulator.getConfigData().addBundle(bundleInfo);
174
		manipulator.getConfigData().addBundle(bundleInfo);
175
		assertTrue(isMarkedStarted(manipulator, osgiTarget, false));
175
		assertTrue(isMarkedStarted(manipulator, osgiTarget, false));
176
176
(-)src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetStartLevelActionTest.java (-3 / +3 lines)
Lines 75-81 Link Here
75
		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
75
		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
76
		assertNotNull(manipulator);
76
		assertNotNull(manipulator);
77
77
78
		BundleInfo bundleInfo = Util.createBundleInfo(osgiTarget, Util.getManifest(iu.getTouchpointData()));
78
		BundleInfo bundleInfo = Util.createBundleInfo(osgiTarget, iu);
79
		manipulator.getConfigData().addBundle(bundleInfo);
79
		manipulator.getConfigData().addBundle(bundleInfo);
80
		assertTrue(isStartLevel(manipulator, osgiTarget, -1));
80
		assertTrue(isStartLevel(manipulator, osgiTarget, -1));
81
81
Lines 121-127 Link Here
121
		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
121
		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
122
		assertNotNull(manipulator);
122
		assertNotNull(manipulator);
123
123
124
		BundleInfo bundleInfo = Util.createBundleInfo(osgiTarget, Util.getManifest(iu.getTouchpointData()));
124
		BundleInfo bundleInfo = Util.createBundleInfo(osgiTarget, iu);
125
		manipulator.getConfigData().addBundle(bundleInfo);
125
		manipulator.getConfigData().addBundle(bundleInfo);
126
		assertTrue(isStartLevel(manipulator, osgiTarget, -1));
126
		assertTrue(isStartLevel(manipulator, osgiTarget, -1));
127
127
Lines 170-176 Link Here
170
		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
170
		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
171
		assertNotNull(manipulator);
171
		assertNotNull(manipulator);
172
172
173
		BundleInfo bundleInfo = Util.createBundleInfo(osgiTarget, Util.getManifest(iu.getTouchpointData()));
173
		BundleInfo bundleInfo = Util.createBundleInfo(osgiTarget, iu);
174
		manipulator.getConfigData().addBundle(bundleInfo);
174
		manipulator.getConfigData().addBundle(bundleInfo);
175
		assertTrue(isStartLevel(manipulator, osgiTarget, -1));
175
		assertTrue(isStartLevel(manipulator, osgiTarget, -1));
176
176
(-)src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallBundleActionTest.java (-1 / +1 lines)
Lines 75-81 Link Here
75
		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
75
		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
76
		assertNotNull(manipulator);
76
		assertNotNull(manipulator);
77
77
78
		BundleInfo bundleInfo = Util.createBundleInfo(osgiTarget, Util.getManifest(iu.getTouchpointData()));
78
		BundleInfo bundleInfo = Util.createBundleInfo(osgiTarget, iu);
79
		manipulator.getConfigData().addBundle(bundleInfo);
79
		manipulator.getConfigData().addBundle(bundleInfo);
80
		assertTrue(inBundles(manipulator, osgiTarget));
80
		assertTrue(inBundles(manipulator, osgiTarget));
81
		UninstallBundleAction action = new UninstallBundleAction();
81
		UninstallBundleAction action = new UninstallBundleAction();
(-)src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UtilTest.java (-8 lines)
Lines 12-26 Link Here
12
12
13
import java.io.File;
13
import java.io.File;
14
import java.net.MalformedURLException;
14
import java.net.MalformedURLException;
15
import java.util.Collections;
16
import java.util.Properties;
15
import java.util.Properties;
17
import junit.framework.Test;
16
import junit.framework.Test;
18
import junit.framework.TestSuite;
17
import junit.framework.TestSuite;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
20
import org.eclipse.equinox.p2.core.IAgentLocation;
19
import org.eclipse.equinox.p2.core.IAgentLocation;
21
import org.eclipse.equinox.p2.engine.IProfile;
20
import org.eclipse.equinox.p2.engine.IProfile;
22
import org.eclipse.equinox.p2.metadata.ITouchpointData;
23
import org.eclipse.equinox.p2.metadata.MetadataFactory;
24
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
21
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
25
22
26
/**
23
/**
Lines 54-62 Link Here
54
		IProfile profile = createProfile("test", props);
51
		IProfile profile = createProfile("test", props);
55
		assertEquals(cacheDir.toURL().toExternalForm(), Util.getBundlePoolLocation(getAgent(), profile).toString());
52
		assertEquals(cacheDir.toURL().toExternalForm(), Util.getBundlePoolLocation(getAgent(), profile).toString());
56
	}
53
	}
57
58
	public void testMissingManifest() {
59
		ITouchpointData emptyData = MetadataFactory.createTouchpointData(Collections.EMPTY_MAP);
60
		assertNull(Util.getManifest(Collections.singletonList(emptyData)));
61
	}
62
}
54
}
(-)META-INF/MANIFEST.MF (+1 lines)
Lines 20-25 Link Here
20
 org.eclipse.equinox.internal.p2.core.helpers,
20
 org.eclipse.equinox.internal.p2.core.helpers,
21
 org.eclipse.equinox.internal.p2.engine,
21
 org.eclipse.equinox.internal.p2.engine,
22
 org.eclipse.equinox.internal.p2.garbagecollector,
22
 org.eclipse.equinox.internal.p2.garbagecollector,
23
 org.eclipse.equinox.internal.p2.metadata,
23
 org.eclipse.equinox.internal.provisional.frameworkadmin,
24
 org.eclipse.equinox.internal.provisional.frameworkadmin,
24
 org.eclipse.equinox.internal.provisional.p2.repository,
25
 org.eclipse.equinox.internal.provisional.p2.repository,
25
 org.eclipse.equinox.internal.simpleconfigurator.manipulator,
26
 org.eclipse.equinox.internal.simpleconfigurator.manipulator,
(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java (-44 / +33 lines)
Lines 12-23 Link Here
12
 *******************************************************************************/
12
 *******************************************************************************/
13
package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
13
package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
14
14
15
import java.io.*;
15
import java.io.File;
16
import java.io.IOException;
16
import java.net.*;
17
import java.net.*;
17
import java.util.*;
18
import java.util.*;
18
import org.eclipse.core.runtime.*;
19
import org.eclipse.core.runtime.*;
19
import org.eclipse.equinox.frameworkadmin.BundleInfo;
20
import org.eclipse.equinox.frameworkadmin.BundleInfo;
20
import org.eclipse.equinox.internal.p2.core.helpers.*;
21
import org.eclipse.equinox.internal.p2.core.helpers.*;
22
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
21
import org.eclipse.equinox.p2.core.*;
23
import org.eclipse.equinox.p2.core.*;
22
import org.eclipse.equinox.p2.engine.IProfile;
24
import org.eclipse.equinox.p2.engine.IProfile;
23
import org.eclipse.equinox.p2.metadata.*;
25
import org.eclipse.equinox.p2.metadata.*;
Lines 25-34 Link Here
25
import org.eclipse.equinox.p2.repository.artifact.*;
27
import org.eclipse.equinox.p2.repository.artifact.*;
26
import org.eclipse.osgi.service.datalocation.Location;
28
import org.eclipse.osgi.service.datalocation.Location;
27
import org.eclipse.osgi.service.environment.EnvironmentInfo;
29
import org.eclipse.osgi.service.environment.EnvironmentInfo;
28
import org.eclipse.osgi.util.ManifestElement;
29
import org.eclipse.osgi.util.NLS;
30
import org.eclipse.osgi.util.NLS;
30
import org.osgi.framework.BundleException;
31
import org.osgi.framework.Constants;
32
31
33
public class Util {
32
public class Util {
34
33
Lines 157-198 Link Here
157
		return listProperty;
156
		return listProperty;
158
	}
157
	}
159
158
160
	public static BundleInfo createBundleInfo(File bundleFile, String manifest) {
159
	public static BundleInfo createBundleInfo(File bundleFile, IInstallableUnit unit) {
161
		BundleInfo bundleInfo = new BundleInfo();
160
		BundleInfo bundleInfo = new BundleInfo();
162
		if (bundleFile != null)
161
		if (bundleFile != null)
163
			bundleInfo.setLocation(bundleFile.toURI());
162
			bundleInfo.setLocation(bundleFile.toURI());
164
163
165
		bundleInfo.setManifest(manifest);
164
		Collection<IProvidedCapability> capabilities = unit.getProvidedCapabilities();
166
		try {
165
		for (IProvidedCapability capability : capabilities) {
167
			Map<String, String> headers = ManifestElement.parseBundleManifest(new ByteArrayInputStream(manifest.getBytes("UTF-8")), new HashMap<String, String>()); //$NON-NLS-1$
166
			String nameSpace = capability.getNamespace();
168
			ManifestElement[] element = ManifestElement.parseHeader("bsn", headers.get(Constants.BUNDLE_SYMBOLICNAME)); //$NON-NLS-1$
167
			if (nameSpace.equals("osgi.bundle")) { //$NON-NLS-1$
169
			if (element == null || element.length == 0)
168
				bundleInfo.setSymbolicName(capability.getName());
170
				return null;
169
			} else if (nameSpace.equals("osgi.fragment")) { //$NON-NLS-1$
171
			bundleInfo.setSymbolicName(element[0].getValue());
170
				String fragmentName = capability.getName();
172
171
				bundleInfo.setFragmentHost(getFragmentHost(unit, fragmentName));
173
			String version = headers.get(Constants.BUNDLE_VERSION);
172
			}
174
			if (version == null)
175
				return null;
176
			// convert to a Version object first to ensure we are consistent with our version number w.r.t.
177
			// padding zeros at the end
178
			bundleInfo.setVersion(Version.parseVersion(version).toString());
179
180
			String fragmentHost = headers.get(Constants.FRAGMENT_HOST);
181
			if (fragmentHost != null)
182
				bundleInfo.setFragmentHost(fragmentHost.trim());
183
184
		} catch (BundleException e) {
185
			// unexpected
186
			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
187
			return null;
188
		} catch (IOException e) {
189
			// unexpected
190
			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
191
			return null;
192
		}
173
		}
174
175
		bundleInfo.setVersion(unit.getVersion().toString());
176
193
		return bundleInfo;
177
		return bundleInfo;
194
	}
178
	}
195
179
180
	private static String getFragmentHost(IInstallableUnit unit, String fragmentName) {
181
		Collection<IRequirement> requires = unit.getRequirements();
182
		for (IRequirement iRequirement : requires) {
183
			if (iRequirement instanceof IRequiredCapability) {
184
				IRequiredCapability requiredCapability = (IRequiredCapability) iRequirement;
185
				if (fragmentName.equals(requiredCapability.getName())) {
186
					String fragmentHost = requiredCapability.getName();
187
					if (!requiredCapability.getRange().toString().equals("0.0.0")) { //$NON-NLS-1$
188
						fragmentHost += ";bundle-version=\"" + requiredCapability.getRange() + '"'; //$NON-NLS-1$
189
					}
190
					return fragmentHost;
191
				}
192
			}
193
		}
194
		return null;
195
	}
196
196
	public static File getArtifactFile(IProvisioningAgent agent, IArtifactKey artifactKey, IProfile profile) {
197
	public static File getArtifactFile(IProvisioningAgent agent, IArtifactKey artifactKey, IProfile profile) {
197
		IFileArtifactRepository aggregatedView = getAggregatedBundleRepository(agent, profile);
198
		IFileArtifactRepository aggregatedView = getAggregatedBundleRepository(agent, profile);
198
		File bundleJar = aggregatedView.getArtifactFile(artifactKey);
199
		File bundleJar = aggregatedView.getArtifactFile(artifactKey);
Lines 313-330 Link Here
313
		return null;
314
		return null;
314
	}
315
	}
315
316
316
	public static String getManifest(Collection<ITouchpointData> data) {
317
		for (ITouchpointData td : data) {
318
			ITouchpointInstruction manifestInstruction = td.getInstruction("manifest"); //$NON-NLS-1$
319
			if (manifestInstruction == null)
320
				return null;
321
			String manifest = manifestInstruction.getBody();
322
			if (manifest != null && manifest.length() > 0)
323
				return manifest;
324
		}
325
		return null;
326
	}
327
328
	public static IStatus createError(String message) {
317
	public static IStatus createError(String message) {
329
		return createError(message, null);
318
		return createError(message, null);
330
	}
319
	}
(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java (-6 / +1 lines)
Lines 69-80 Link Here
69
		if (bundleFile == null || !bundleFile.exists())
69
		if (bundleFile == null || !bundleFile.exists())
70
			return Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey));
70
			return Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey));
71
71
72
		//By now we always have the manifest in the touchpoint data
72
		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
73
		String manifest = Util.getManifest(iu.getTouchpointData());
74
		if (manifest == null)
75
			return Util.createError(NLS.bind(Messages.missing_manifest, iu));
76
77
		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
78
		if (bundleInfo == null)
73
		if (bundleInfo == null)
79
			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
74
			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
80
		manipulator.getConfigData().addBundle(bundleInfo);
75
		manipulator.getConfigData().addBundle(bundleInfo);
(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java (-10 / +2 lines)
Lines 47-57 Link Here
47
		// the bundleFile might be null here, that's OK.
47
		// the bundleFile might be null here, that's OK.
48
		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
48
		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
49
49
50
		String manifest = Util.getManifest(iu.getTouchpointData());
50
		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
51
		if (manifest == null)
52
			return Util.createError(NLS.bind(Messages.missing_manifest, iu));
53
54
		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
55
		if (bundleInfo == null)
51
		if (bundleInfo == null)
56
			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
52
			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
57
53
Lines 87-97 Link Here
87
		// the bundleFile might be null here, that's OK.
83
		// the bundleFile might be null here, that's OK.
88
		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
84
		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
89
85
90
		String manifest = Util.getManifest(iu.getTouchpointData());
86
		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
91
		if (manifest == null)
92
			return Util.createError(NLS.bind(Messages.missing_manifest, iu));
93
94
		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
95
		if (bundleInfo == null)
87
		if (bundleInfo == null)
96
			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
88
			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
97
89
(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java (-10 / +2 lines)
Lines 46-56 Link Here
46
		// the bundleFile might be null here, that's OK.
46
		// the bundleFile might be null here, that's OK.
47
		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
47
		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
48
48
49
		String manifest = Util.getManifest(iu.getTouchpointData());
49
		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
50
		if (manifest == null)
51
			return Util.createError(NLS.bind(Messages.missing_manifest, iu));
52
53
		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
54
		if (bundleInfo == null)
50
		if (bundleInfo == null)
55
			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
51
			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
56
52
Lines 90-100 Link Here
90
		// the bundleFile might be null here, that's OK.
86
		// the bundleFile might be null here, that's OK.
91
		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
87
		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
92
88
93
		String manifest = Util.getManifest(iu.getTouchpointData());
89
		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
94
		if (manifest == null)
95
			return Util.createError(NLS.bind(Messages.missing_manifest, iu));
96
97
		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
98
		if (bundleInfo == null)
90
		if (bundleInfo == null)
99
			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
91
			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
100
92
(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java (-5 / +1 lines)
Lines 68-78 Link Here
68
		// the bundleFile might be null here, that's OK.
68
		// the bundleFile might be null here, that's OK.
69
		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
69
		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
70
70
71
		String manifest = Util.getManifest(iu.getTouchpointData());
71
		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
72
		if (manifest == null)
73
			return Util.createError(NLS.bind(Messages.missing_manifest, iu));
74
75
		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
76
		if (bundleInfo == null)
72
		if (bundleInfo == null)
77
			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
73
			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
78
		manipulator.getConfigData().removeBundle(bundleInfo);
74
		manipulator.getConfigData().removeBundle(bundleInfo);

Return to bug 330463