|
Lines 7-12
Link Here
|
| 7 |
* Contributors: |
7 |
* Contributors: |
| 8 |
* IBM Corporation - initial API and implementation |
8 |
* IBM Corporation - initial API and implementation |
| 9 |
* Pascal Rapicault - Support for bundled macosx application - http://bugs.eclipse.org/57349 |
9 |
* Pascal Rapicault - Support for bundled macosx application - http://bugs.eclipse.org/57349 |
|
|
10 |
* Christian Walther (Indel AG) - [325368] respect "Bundle JRE" checkbox |
| 10 |
******************************************************************************/ |
11 |
******************************************************************************/ |
| 11 |
|
12 |
|
| 12 |
package org.eclipse.pde.internal.build.publisher; |
13 |
package org.eclipse.pde.internal.build.publisher; |
|
Lines 29-34
import org.eclipse.equinox.internal.p2.engine.phases.Install;
Link Here
|
| 29 |
import org.eclipse.equinox.internal.p2.metadata.*; |
30 |
import org.eclipse.equinox.internal.p2.metadata.*; |
| 30 |
import org.eclipse.equinox.internal.p2.publisher.eclipse.BrandingIron; |
31 |
import org.eclipse.equinox.internal.p2.publisher.eclipse.BrandingIron; |
| 31 |
import org.eclipse.equinox.internal.p2.publisher.eclipse.ExecutablesDescriptor; |
32 |
import org.eclipse.equinox.internal.p2.publisher.eclipse.ExecutablesDescriptor; |
|
|
33 |
import org.eclipse.equinox.internal.p2.touchpoint.natives.Util; |
| 32 |
import org.eclipse.equinox.p2.core.IProvisioningAgent; |
34 |
import org.eclipse.equinox.p2.core.IProvisioningAgent; |
| 33 |
import org.eclipse.equinox.p2.core.ProvisionException; |
35 |
import org.eclipse.equinox.p2.core.ProvisionException; |
| 34 |
import org.eclipse.equinox.p2.internal.repository.tools.Repo2Runnable; |
36 |
import org.eclipse.equinox.p2.internal.repository.tools.Repo2Runnable; |
|
Lines 177-182
public class BrandP2Task extends Repo2RunnableTask {
Link Here
|
| 177 |
|
179 |
|
| 178 |
ius = super.prepareIUs(); |
180 |
ius = super.prepareIUs(); |
| 179 |
|
181 |
|
|
|
182 |
// Here - IUs are known, but the superclass hasn't acted on them yet - |
| 183 |
// is a good place to clear the download cache to make sure we actually |
| 184 |
// fetch the new artifact from where it was built, otherwise we may |
| 185 |
// reuse an outdated cached copy from an earlier build because its |
| 186 |
// version number stays the same in every build. |
| 187 |
IProvisioningAgent agent = (IProvisioningAgent) BundleHelper.getDefault().acquireService(IProvisioningAgent.SERVICE_NAME); |
| 188 |
if (agent == null) |
| 189 |
throw new BuildException(TaskMessages.error_agentService); |
| 190 |
try { |
| 191 |
IArtifactRepository repo = Util.getDownloadCacheRepo(agent); |
| 192 |
for (Iterator i = ius.iterator(); i.hasNext();) { |
| 193 |
Collection artifactKeys = ((IInstallableUnit) i.next()).getArtifacts(); |
| 194 |
for (Iterator j = artifactKeys.iterator(); j.hasNext();) { |
| 195 |
repo.removeDescriptor((IArtifactKey) j.next(), null); |
| 196 |
} |
| 197 |
} |
| 198 |
} catch (ProvisionException e) { |
| 199 |
// agent download cache not writable |
| 200 |
throw new BuildException(e); |
| 201 |
} |
| 202 |
|
| 180 |
return ius; |
203 |
return ius; |
| 181 |
} |
204 |
} |
| 182 |
|
205 |
|
| 183 |
- |
|
|