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 136663 Details for
Bug 275316
[publisher] CU versions should match product, not host
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]
updated patch includes pde.build
275316.txt (text/plain), 12.35 KB, created by
Andrew Niefer
on 2009-05-21 11:27:59 EDT
(
hide
)
Description:
updated patch includes pde.build
Filename:
MIME Type:
Creator:
Andrew Niefer
Created:
2009-05-21 11:27:59 EDT
Size:
12.35 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.build >Index: src/org/eclipse/pde/internal/build/P2InfUtils.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/P2InfUtils.java,v >retrieving revision 1.3 >diff -u -r1.3 P2InfUtils.java >--- src/org/eclipse/pde/internal/build/P2InfUtils.java 23 Apr 2009 21:35:21 -0000 1.3 >+++ src/org/eclipse/pde/internal/build/P2InfUtils.java 21 May 2009 15:28:37 -0000 >@@ -24,29 +24,35 @@ > > private static final VersionRange BUNDLE_RANGE = new VersionRange("[1.0.0, 2.0.0)"); //$NON-NLS-1$ > >- public static void printBundleCU(StringBuffer buffer, int i, String name, Version version, String filter, String[] instructions) { >- VersionRange range = new VersionRange(version, true, version, true); >+ public static void printBundleCU(StringBuffer buffer, int i, String name, Version hostVersion, String filter, String[] instructions) { >+ printBundleCU(buffer, i, name, hostVersion.toString(), hostVersion, filter, instructions); >+ } > >+ public static void printBundleCU(StringBuffer buffer, int i, String name, String cuVersion, Version hostVersion, String filter, String[] instructions) { >+ VersionRange hostRange = new VersionRange(hostVersion, true, hostVersion, true); >+ //cuVersion may not be a proper OSGi version at this point (ie 1.0.0.$qualifier$) >+ String cuRange = "[" + cuVersion + "," + cuVersion + "]"; //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ > String prefix = "units." + i + '.'; //$NON-NLS-1$ > >- printRequires(buffer, null, i, NAMESPACE_IU, "@FLAVOR@" + name, range, filter, true); //$NON-NLS-1$ >+ //generate requirement to the new CU we are creating >+ printRequires(buffer, null, i, NAMESPACE_IU, "@FLAVOR@" + name, cuRange, filter, true); //$NON-NLS-1$ > > buffer.append(prefix + "id=@FLAVOR@" + name + '\n'); //$NON-NLS-1$ >- buffer.append(prefix + "version=" + version + '\n'); //$NON-NLS-1$ >+ buffer.append(prefix + "version=" + cuVersion + '\n'); //$NON-NLS-1$ > buffer.append(prefix + "properties.1.name=org.eclipse.pde.build.default\n"); //$NON-NLS-1$ > buffer.append(prefix + "properties.1.value=true\n"); //$NON-NLS-1$ > if (filter != null) > buffer.append(prefix + "filter=" + filter + '\n'); //$NON-NLS-1$ > >- printProvides(buffer, prefix, 1, NAMESPACE_IU, "@FLAVOR@" + name, version.toString()); //$NON-NLS-1$ >+ printProvides(buffer, prefix, 1, NAMESPACE_IU, "@FLAVOR@" + name, cuVersion); //$NON-NLS-1$ > printProvides(buffer, prefix, 2, NAMESPACE_FLAVOR, "@FLAVOR@", "1.0.0"); //$NON-NLS-1$ //$NON-NLS-2$ > > printInstructions(buffer, prefix, instructions); > >- printHostRequires(buffer, prefix, 1, NAMESPACE_OSGI, name, range, false); >+ printHostRequires(buffer, prefix, 1, NAMESPACE_OSGI, name, hostRange, false); > printHostRequires(buffer, prefix, 2, NAMESPACE_TYPE, "bundle", BUNDLE_RANGE, false); //$NON-NLS-1$ > >- printRequires(buffer, prefix, 1, NAMESPACE_OSGI, name, range, null, false); >+ printRequires(buffer, prefix, 1, NAMESPACE_OSGI, name, hostRange, null, false); > printRequires(buffer, prefix, 2, NAMESPACE_TYPE, "bundle", BUNDLE_RANGE, null, false); //$NON-NLS-1$ > } > >Index: src/org/eclipse/pde/internal/build/ProductGenerator.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductGenerator.java,v >retrieving revision 1.36 >diff -u -r1.36 ProductGenerator.java >--- src/org/eclipse/pde/internal/build/ProductGenerator.java 6 May 2009 20:48:13 -0000 1.36 >+++ src/org/eclipse/pde/internal/build/ProductGenerator.java 21 May 2009 15:28:37 -0000 >@@ -155,6 +155,17 @@ > > private void generateP2InfCUs(StringBuffer buffer, int startIndex, boolean cus, boolean launchers) { > int index = startIndex; >+ >+ String productVersionString = productFile.getVersion(); >+ String productRangeString = null; >+ if (productVersionString.endsWith(PROPERTY_QUALIFIER)) { >+ Version productVersion = new Version(productVersionString); >+ productVersionString = productVersion.getMajor() + "." + productVersion.getMinor() + "." + productVersion.getMicro() + ".$qualifier$"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ productRangeString = "[" + productVersionString + "," + productVersionString + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ } else { >+ productRangeString = new VersionRange(new Version(productVersionString), true, new Version(productVersionString), true).toString(); >+ } >+ > if (cus) { > BundleInfo[] infos = getDefaultStartInfo(); > for (int i = 0; i < infos.length && infos[i] != null; i++) { >@@ -172,7 +183,10 @@ > instructions[P2InfUtils.INSTRUCTION_CONFIGURE] += "setProgramProperty(propName:org.eclipse.update.reconcile, propValue:false);"; //$NON-NLS-1$ > instructions[P2InfUtils.INSTRUCTION_UNCONFIGURE] += "setProgramProperty(propName:org.eclipse.update.reconcile, propValue:);"; //$NON-NLS-1$ > } >- P2InfUtils.printBundleCU(buffer, index++, bundle.getSymbolicName(), bundle.getVersion(), bundle.getPlatformFilter(), instructions); >+ if (!GENERIC_VERSION_NUMBER.equals(productVersionString)) >+ P2InfUtils.printBundleCU(buffer, index++, bundle.getSymbolicName(), productVersionString, bundle.getVersion(), bundle.getPlatformFilter(), instructions); >+ else >+ P2InfUtils.printBundleCU(buffer, index++, bundle.getSymbolicName(), bundle.getVersion(), bundle.getPlatformFilter(), instructions); > > } > } >@@ -180,15 +194,6 @@ > BundleDescription launcher = assembly.getPlugin(BUNDLE_EQUINOX_LAUNCHER, null); > if (launcher != null && launchers) { > VersionRange launcherRange = new VersionRange(launcher.getVersion(), true, launcher.getVersion(), true); >- String versionString = productFile.getVersion(); >- String rangeString = null; >- if (versionString.endsWith(PROPERTY_QUALIFIER)) { >- Version productVersion = new Version(versionString); >- versionString = productVersion.getMajor() + "." + productVersion.getMinor() + "." + productVersion.getMicro() + ".$qualifier$"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >- rangeString = "[" + versionString + "," + versionString + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >- } else { >- rangeString = new VersionRange(new Version(versionString), true, new Version(versionString), true).toString(); >- } > > // include the launcher jar > P2InfUtils.printRequires(buffer, null, index++, P2InfUtils.NAMESPACE_IU, BUNDLE_EQUINOX_LAUNCHER, launcherRange, launcher.getPlatformFilter(), true); >@@ -201,13 +206,13 @@ > instructions[P2InfUtils.INSTRUCTION_UNCONFIGURE] = "removeProgramArg(programArg:-startup);removeProgramArg(programArg:@artifact);"; //$NON-NLS-1$ > P2InfUtils.printBundleCU(buffer, index++, BUNDLE_EQUINOX_LAUNCHER, launcher.getVersion(), null, instructions); > >- String brandedRange = rangeString; >+ String brandedRange = productRangeString; > BuildTimeFeature executableFeature = assembly.getRootProvider(FEATURE_EQUINOX_EXECUTABLE, null); > if (executableFeature == null && havePDEUIState()) > executableFeature = assembly.getRootProvider("org.eclipse.pde.container.feature", null); //$NON-NLS-1$ > > //in case of no version on the product, the branding defaults to the version of the launcher provider >- if (executableFeature != null && versionString.equals(Version.emptyVersion.toString())) { >+ if (executableFeature != null && productVersionString.equals(Version.emptyVersion.toString())) { > String brandedVersion = executableFeature.getVersion(); > brandedRange = new VersionRange(new Version(brandedVersion), true, new Version(brandedVersion), true).toString(); > } >@@ -232,6 +237,7 @@ > instructions[P2InfUtils.INSTRUCTION_UNINSTALL] = UNINSTALL_INSTRUCTION; > instructions[P2InfUtils.INSTRUCTION_CONFIGURE] = "addProgramArg(programArg:--launcher.library);addProgramArg(programArg:@artifact);"; //$NON-NLS-1$ > instructions[P2InfUtils.INSTRUCTION_UNCONFIGURE] = "removeProgramArg(programArg:--launcher.library);removeProgramArg(programArg:@artifact);"; //$NON-NLS-1$ >+ //launcher CU gets same version as launcher > P2InfUtils.printBundleCU(buffer, index++, fragment.getSymbolicName(), fragment.getVersion(), fragment.getPlatformFilter(), instructions); > > if (executableFeature != null) { >@@ -244,7 +250,7 @@ > String launcherName = getLauncherName(executableFeature); > instructions[P2InfUtils.INSTRUCTION_CONFIGURE] = "setLauncherName(name:" + launcherName + ")"; //$NON-NLS-1$ //$NON-NLS-2$ > instructions[P2InfUtils.INSTRUCTION_UNCONFIGURE] = "setLauncherName()"; //$NON-NLS-1$ >- P2InfUtils.printIU(buffer, index++, brandedIU, versionString, config.getPlatformFilter(), instructions); >+ P2InfUtils.printIU(buffer, index++, brandedIU, productVersionString, config.getPlatformFilter(), instructions); > } > } > } >#P org.eclipse.equinox.p2.publisher >Index: src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java,v >retrieving revision 1.17 >diff -u -r1.17 ConfigCUsAction.java >--- src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java 12 May 2009 20:21:28 -0000 1.17 >+++ src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java 21 May 2009 15:28:38 -0000 >@@ -322,7 +322,12 @@ > continue; > } > >- IInstallableUnit cu = BundlesAction.createBundleConfigurationUnit(bundle.getSymbolicName(), Version.parseVersion(bundle.getVersion()), false, bundle, flavor + cuIdPrefix, filter); >+ IInstallableUnit cu = null; >+ if (this.version != null && !this.version.equals(Version.emptyVersion)) >+ cu = BundlesAction.createBundleConfigurationUnit(bundle.getSymbolicName(), this.version, false, bundle, flavor + cuIdPrefix, filter); >+ else >+ cu = BundlesAction.createBundleConfigurationUnit(bundle.getSymbolicName(), Version.parseVersion(bundle.getVersion()), false, bundle, flavor + cuIdPrefix, filter); >+ > if (cu != null) { > // Product Query will run against the repo, make sure these CUs are in before then > // TODO review the aggressive addition to the metadata repo. perhaps the query can query the result as well. >#P org.eclipse.pde.build.tests >Index: src/org/eclipse/pde/build/internal/tests/p2/PublishingTests.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build.tests/src/org/eclipse/pde/build/internal/tests/p2/PublishingTests.java,v >retrieving revision 1.69 >diff -u -r1.69 PublishingTests.java >--- src/org/eclipse/pde/build/internal/tests/p2/PublishingTests.java 8 May 2009 23:27:55 -0000 1.69 >+++ src/org/eclipse/pde/build/internal/tests/p2/PublishingTests.java 21 May 2009 15:28:39 -0000 >@@ -743,9 +743,10 @@ > assertTrue(productIu.getVersion().getQualifier().startsWith(QualifierReplacer.getDateQualifier().substring(0, 8))); > assertTouchpoint(productIu, "configure", "addRepository(type:0,location:file${#58}//foo/bar);"); > >- getIU(finalRepo, "toolingorg.eclipse.equinox.common"); >+ IInstallableUnit iu = getIU(finalRepo, "toolingorg.eclipse.equinox.common"); >+ assertEquals(iu.getVersion(), productIu.getVersion()); > >- IInstallableUnit iu = getIU(finalRepo, "toolingheadless.product_root." + Platform.getWS() + '.' + Platform.getOS() + '.' + Platform.getOSArch()); >+ iu = getIU(finalRepo, "toolingheadless.product_root." + Platform.getWS() + '.' + Platform.getOS() + '.' + Platform.getOSArch()); > assertTouchpoint(iu, "configure", "setLauncherName(name:headless"); > assertEquals(iu.getVersion(), productIu.getVersion()); > } >@@ -968,8 +969,10 @@ > iu = getIU(metadata, "toolinguid.product.config.win32.win32.x86"); > assertTouchpoint(iu, "configure", "setProgramProperty(propName:eclipse.application, propValue:my.app);"); > assertTouchpoint(iu, "configure", "setProgramProperty(propName:eclipse.product, propValue:rcp.product);"); >+ assertEquals(iu.getVersion().toString(), "1.0.0.I10232"); > > iu = getIU(metadata, "toolingorg.eclipse.equinox.simpleconfigurator"); >+ assertEquals(iu.getVersion().toString(), "1.0.0.I10232"); > assertTouchpoint(iu, "configure", "setStartLevel(startLevel:1);markStarted(started:true);"); > assertFalse(buildFolder.getFile("tmp/eclipse/eclipse.exe").exists()); > }
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 275316
:
135713
| 136663