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 223252 Details for
Bug 325368
Product export bundles JRE even when "bundle jre for this environment" is unchecked
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
2-clearcache.patch
2-clearcache.patch (text/plain), 3.86 KB, created by
Christian Walther
on 2012-11-06 11:21:46 EST
(
hide
)
Description:
2-clearcache.patch
Filename:
MIME Type:
Creator:
Christian Walther
Created:
2012-11-06 11:21:46 EST
Size:
3.86 KB
patch
obsolete
>From 6e18c1d6a532351343f3a5d695c7fd15f53bfe6e Mon Sep 17 00:00:00 2001 >From: Christian Walther <walther@indel.ch> >Date: Mon, 5 Nov 2012 13:52:15 +0100 >Subject: [PATCH] Bug 325368 - Clear the download cache before unpacking the > launcher provider IU, otherwise an outdated cached copy > that includes the JRE may be used, even though no JRE was > bundled in this build, or vice versa. > >--- > org.eclipse.pde.build/META-INF/MANIFEST.MF | 3 +- > .../pde/internal/build/publisher/BrandP2Task.java | 23 ++++++++++++++++++++ > 2 files changed, 25 insertions(+), 1 deletions(-) > >diff --git a/org.eclipse.pde.build/META-INF/MANIFEST.MF b/org.eclipse.pde.build/META-INF/MANIFEST.MF >index e82ec7c..72f359d 100644 >--- a/org.eclipse.pde.build/META-INF/MANIFEST.MF >+++ b/org.eclipse.pde.build/META-INF/MANIFEST.MF >@@ -25,7 +25,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)", > org.eclipse.equinox.p2.publisher;bundle-version="1.1.0", > org.eclipse.equinox.p2.repository.tools;bundle-version="[2.0.0,3.0.0)";resolution:=optional, > org.eclipse.equinox.p2.director.app;bundle-version="1.0.200", >- org.eclipse.equinox.p2.publisher.eclipse;bundle-version="1.0.0" >+ org.eclipse.equinox.p2.publisher.eclipse;bundle-version="1.0.0", >+ org.eclipse.equinox.p2.touchpoint.natives;bundle-version="1.1.0" > Import-Package: com.ibm.icu.util, > org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)", > org.eclipse.equinox.internal.p2.core.helpers, >diff --git a/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/publisher/BrandP2Task.java b/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/publisher/BrandP2Task.java >index 5fc88eb..4f0cb07 100644 >--- a/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/publisher/BrandP2Task.java >+++ b/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/publisher/BrandP2Task.java >@@ -7,6 +7,7 @@ > * Contributors: > * IBM Corporation - initial API and implementation > * Pascal Rapicault - Support for bundled macosx application - http://bugs.eclipse.org/57349 >+ * Christian Walther (Indel AG) - [325368] respect "Bundle JRE" checkbox > ******************************************************************************/ > > package org.eclipse.pde.internal.build.publisher; >@@ -29,6 +30,7 @@ import org.eclipse.equinox.internal.p2.engine.phases.Install; > import org.eclipse.equinox.internal.p2.metadata.*; > import org.eclipse.equinox.internal.p2.publisher.eclipse.BrandingIron; > import org.eclipse.equinox.internal.p2.publisher.eclipse.ExecutablesDescriptor; >+import org.eclipse.equinox.internal.p2.touchpoint.natives.Util; > import org.eclipse.equinox.p2.core.IProvisioningAgent; > import org.eclipse.equinox.p2.core.ProvisionException; > import org.eclipse.equinox.p2.internal.repository.tools.Repo2Runnable; >@@ -177,6 +179,27 @@ public class BrandP2Task extends Repo2RunnableTask { > > ius = super.prepareIUs(); > >+ // Here - IUs are known, but the superclass hasn't acted on them yet - >+ // is a good place to clear the download cache to make sure we actually >+ // fetch the new artifact from where it was built, otherwise we may >+ // reuse an outdated cached copy from an earlier build because its >+ // version number stays the same in every build. >+ IProvisioningAgent agent = (IProvisioningAgent) BundleHelper.getDefault().acquireService(IProvisioningAgent.SERVICE_NAME); >+ if (agent == null) >+ throw new BuildException(TaskMessages.error_agentService); >+ try { >+ IArtifactRepository repo = Util.getDownloadCacheRepo(agent); >+ for (Iterator i = ius.iterator(); i.hasNext();) { >+ Collection artifactKeys = ((IInstallableUnit) i.next()).getArtifacts(); >+ for (Iterator j = artifactKeys.iterator(); j.hasNext();) { >+ repo.removeDescriptor((IArtifactKey) j.next(), null); >+ } >+ } >+ } catch (ProvisionException e) { >+ // agent download cache not writable >+ throw new BuildException(e); >+ } >+ > return ius; > } > >-- >1.7.5.4 >
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 325368
:
178953
|
223251
| 223252 |
223254