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 168036 Details for
Bug 282260
Executable bit is not set on exported launcher executable.
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]
patch
282260.txt (text/plain), 12.80 KB, created by
Andrew Niefer
on 2010-05-11 16:56:34 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Andrew Niefer
Created:
2010-05-11 16:56:34 EDT
Size:
12.80 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.build >Index: src/org/eclipse/pde/internal/build/AssembleConfigScriptGenerator.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AssembleConfigScriptGenerator.java,v >retrieving revision 1.140 >diff -u -r1.140 AssembleConfigScriptGenerator.java >--- src/org/eclipse/pde/internal/build/AssembleConfigScriptGenerator.java 19 Mar 2010 19:42:08 -0000 1.140 >+++ src/org/eclipse/pde/internal/build/AssembleConfigScriptGenerator.java 11 May 2010 20:56:20 -0000 >@@ -934,7 +934,10 @@ > > if (BuildDirector.p2Gathering) { > //TODO permissions >- fileSets.add(new ZipFileSet(Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE), false, null, "**/**", null, null, null, productFile != null ? Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) : null, null, null)); //$NON-NLS-1$ >+ FileSet[] permissions = generatePermissions(Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE), true); >+ String toExcludeFromArchive = Utils.getStringFromCollection(this.addedByPermissions, ","); //$NON-NLS-1$ >+ fileSets.add(new ZipFileSet(Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE), false, null, "**/**", null, toExcludeFromArchive, null, productFile != null ? Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) : null, null, null)); //$NON-NLS-1$ >+ fileSets.addAll(Arrays.asList(permissions)); > } else { > for (int i = 0; i < plugins.length; i++) { > Object[] shape = shapeAdvisor.getFinalShape(plugins[i]); >@@ -954,7 +957,7 @@ > fileSets.add(new ZipFileSet(Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE) + '/' + elt.toStringReplacingAny(".", ANY_STRING), false, null, "**/**", null, null, null, elt.toStringReplacingAny(".", ANY_STRING), null, null)); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ > } > } else { >- FileSet[] permissions = generatePermissions(true); >+ FileSet[] permissions = generatePermissions(rootFolder, true); > String toExcludeFromArchive = Utils.getStringFromCollection(this.addedByPermissions, ","); //$NON-NLS-1$ > fileSets.add(new ZipFileSet(rootFolder, false, null, "**/**", null, toExcludeFromArchive, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX), null, null)); //$NON-NLS-1$ > fileSets.addAll(Arrays.asList(permissions)); >@@ -967,13 +970,17 @@ > } > } > >- protected FileSet[] generatePermissions(boolean zip) { >+ protected Collection getArchiveRootFileProviders() { >+ return rootFileProviders != null ? rootFileProviders : Collections.EMPTY_LIST; >+ } >+ >+ protected FileSet[] generatePermissions(String root, boolean zip) { > String configInfix = configInfo.toString("."); //$NON-NLS-1$ > String prefixPermissions = ROOT_PREFIX + configInfix + '.' + PERMISSIONS + '.'; > String commonPermissions = ROOT_PREFIX + PERMISSIONS + '.'; > ArrayList fileSets = new ArrayList(); > >- for (Iterator iter = rootFileProviders.iterator(); iter.hasNext();) { >+ for (Iterator iter = getArchiveRootFileProviders().iterator(); iter.hasNext();) { > Properties featureProperties = getFeatureBuildProperties((BuildTimeFeature) iter.next()); > for (Iterator iter2 = featureProperties.entrySet().iterator(); iter2.hasNext();) { > Map.Entry permission = (Map.Entry) iter2.next(); >@@ -985,17 +992,17 @@ > if (instruction.startsWith(prefixPermissions)) { > addedByPermissions.add(values[i]); > if (zip) >- fileSets.add(new ZipFileSet(rootFolder + (isFile ? '/' + values[i] : ""), isFile, null, isFile ? null : values[i] + "/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) + (isFile ? '/' + values[i] : ""), null, instruction.substring(prefixPermissions.length()))); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ >+ fileSets.add(new ZipFileSet(root + (isFile ? '/' + values[i] : ""), isFile, null, isFile ? null : values[i] + "/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) + (isFile ? '/' + values[i] : ""), null, instruction.substring(prefixPermissions.length()))); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ > else >- fileSets.add(new TarFileSet(rootFolder + (isFile ? '/' + values[i] : ""), isFile, null, isFile ? null : values[i] + "/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) + (isFile ? '/' + values[i] : ""), null, instruction.substring(prefixPermissions.length()))); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ >+ fileSets.add(new TarFileSet(root + (isFile ? '/' + values[i] : ""), isFile, null, isFile ? null : values[i] + "/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) + (isFile ? '/' + values[i] : ""), null, instruction.substring(prefixPermissions.length()))); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ > continue; > } > if (instruction.startsWith(commonPermissions)) { > addedByPermissions.add(values[i]); > if (zip) >- fileSets.add(new ZipFileSet(rootFolder + (isFile ? '/' + values[i] : ""), isFile, null, isFile ? null : values[i] + "/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) + (isFile ? '/' + values[i] : ""), null, instruction.substring(commonPermissions.length()))); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ >+ fileSets.add(new ZipFileSet(root + (isFile ? '/' + values[i] : ""), isFile, null, isFile ? null : values[i] + "/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) + (isFile ? '/' + values[i] : ""), null, instruction.substring(commonPermissions.length()))); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ > else >- fileSets.add(new TarFileSet(rootFolder + (isFile ? '/' + values[i] : ""), isFile, null, isFile ? null : values[i] + "/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) + (isFile ? '/' + values[i] : ""), null, instruction.substring(commonPermissions.length()))); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ >+ fileSets.add(new TarFileSet(root + (isFile ? '/' + values[i] : ""), isFile, null, isFile ? null : values[i] + "/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) + (isFile ? '/' + values[i] : ""), null, instruction.substring(commonPermissions.length()))); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ > continue; > } > } >@@ -1009,7 +1016,10 @@ > List fileSets = new ArrayList(); > > if (BuildDirector.p2Gathering) { >- fileSets.add(new TarFileSet(Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE), false, null, "**/**", null, null, null, productFile != null ? Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) : null, null, null)); //$NON-NLS-1$ >+ FileSet[] permissions = generatePermissions(Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE), false); >+ String toExcludeFromArchive = Utils.getStringFromCollection(this.addedByPermissions, ","); //$NON-NLS-1$ >+ fileSets.add(new TarFileSet(Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE), false, null, "**/**", null, toExcludeFromArchive, null, productFile != null ? Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) : null, null, null)); //$NON-NLS-1$ >+ fileSets.addAll(Arrays.asList(permissions)); > } else { > //FileSet[] filesPlugins = new FileSet[plugins.length]; > for (int i = 0; i < plugins.length; i++) { >@@ -1023,7 +1033,7 @@ > } > > if (rootFileProviders.size() > 0) { >- FileSet[] permissionSets = generatePermissions(false); >+ FileSet[] permissionSets = generatePermissions(rootFolder, false); > fileSets.add(new TarFileSet(rootFolder, false, null, "**/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX), null, null)); //$NON-NLS-1$ > fileSets.add(Arrays.asList(permissionSets)); > } >Index: src/org/eclipse/pde/internal/build/packager/PackageConfigScriptGenerator.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackageConfigScriptGenerator.java,v >retrieving revision 1.32 >diff -u -r1.32 PackageConfigScriptGenerator.java >--- src/org/eclipse/pde/internal/build/packager/PackageConfigScriptGenerator.java 21 Jan 2010 16:41:31 -0000 1.32 >+++ src/org/eclipse/pde/internal/build/packager/PackageConfigScriptGenerator.java 11 May 2010 20:56:20 -0000 >@@ -11,8 +11,7 @@ > package org.eclipse.pde.internal.build.packager; > > import java.io.*; >-import java.util.ArrayList; >-import java.util.Properties; >+import java.util.*; > import org.eclipse.core.runtime.*; > import org.eclipse.osgi.service.resolver.BundleDescription; > import org.eclipse.osgi.util.NLS; >@@ -25,6 +24,18 @@ > public class PackageConfigScriptGenerator extends AssembleConfigScriptGenerator { > > private Properties packagingProperties; >+ private Collection archiveRootProviders = Collections.EMPTY_LIST; >+ >+ public void initialize(String directoryName, String feature, Config configurationInformation, Collection elementList, Collection featureList, Collection allFeaturesList, Collection rootProviders) throws CoreException { >+ /* package scripts require the root file providers for creating the file archive, but don't want them for other rootfile >+ * stuff done by the assembly scripts, so keep them separate here */ >+ super.initialize(directoryName, feature, configurationInformation, elementList, featureList, allFeaturesList, Collections.EMPTY_SET); >+ archiveRootProviders = rootProviders != null ? rootProviders : Collections.EMPTY_LIST; >+ } >+ >+ protected Collection getArchiveRootFileProviders() { >+ return archiveRootProviders; >+ } > > private String getFinalName(BundleDescription bundle, String shape) { > final String JAR = "jar"; //$NON-NLS-1$ >Index: src/org/eclipse/pde/internal/build/packager/PackageScriptGenerator.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackageScriptGenerator.java,v >retrieving revision 1.35 >diff -u -r1.35 PackageScriptGenerator.java >--- src/org/eclipse/pde/internal/build/packager/PackageScriptGenerator.java 11 Feb 2010 18:42:43 -0000 1.35 >+++ src/org/eclipse/pde/internal/build/packager/PackageScriptGenerator.java 11 May 2010 20:56:20 -0000 >@@ -45,7 +45,7 @@ > } > > protected Collection[] getConfigInfos(Config aConfig) { >- return new Collection[] {assemblageInformation.getBinaryPlugins(aConfig), assemblageInformation.getBinaryFeatures(aConfig), assemblageInformation.getFeatures(aConfig), new HashSet(0)}; >+ return new Collection[] {assemblageInformation.getBinaryPlugins(aConfig), assemblageInformation.getBinaryFeatures(aConfig), assemblageInformation.getFeatures(aConfig), BuildDirector.p2Gathering ? assemblageInformation.getRootFileProviders(aConfig) : new HashSet(0)}; > } > > protected void generateP2ConfigFileTargetCall() { >#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.97 >diff -u -r1.97 PublishingTests.java >--- src/org/eclipse/pde/build/internal/tests/p2/PublishingTests.java 11 May 2010 15:29:38 -0000 1.97 >+++ src/org/eclipse/pde/build/internal/tests/p2/PublishingTests.java 11 May 2010 20:56:20 -0000 >@@ -9,8 +9,7 @@ > > package org.eclipse.pde.build.internal.tests.p2; > >-import java.io.File; >-import java.io.FilenameFilter; >+import java.io.*; > import java.net.URI; > import java.net.URL; > import java.util.*; >@@ -1569,8 +1568,30 @@ > runProductBuild(buildFolder); > > IFile ini = buildFolder.getFile("eclipse.ini"); >- if (!Utils.extractFromZip(buildFolder, "I.TestBuild/eclipse-macosx.carbon.ppc.zip", "eclipse/eclipse.app/Contents/MacOS/eclipse.ini", ini)) >+ boolean lowerCase = true; >+ if (!Utils.extractFromZip(buildFolder, "I.TestBuild/eclipse-macosx.carbon.ppc.zip", "eclipse/eclipse.app/Contents/MacOS/eclipse.ini", ini)) { >+ lowerCase = false; > Utils.extractFromZip(buildFolder, "I.TestBuild/eclipse-macosx.carbon.ppc.zip", "eclipse/Eclipse.app/Contents/MacOS/eclipse.ini", ini); >+ } >+ >+ if (Platform.getOS().equals("linux")) { >+ IFile zip = buildFolder.getFile("I.TestBuild/eclipse-macosx.carbon.ppc.zip"); >+ >+ String exeString = (lowerCase ? "eclipse/eclipse.app/" : "eclipse/Eclipse.app/") + "Contents/MacOS/eclipse"; >+ String[] command = new String[] {"unzip", "-qq", zip.getLocation().toOSString(), exeString, "-d", buildFolder.getLocation().toOSString()}; >+ Process proc = Runtime.getRuntime().exec(command); >+ proc.waitFor(); >+ >+ IFile executable = buildFolder.getFile(exeString); >+ assertResourceFile(executable); >+ >+ command = new String[] {"ls", "-la", executable.getLocation().toOSString()}; >+ proc = Runtime.getRuntime().exec(command); >+ Utils.transferStreams(proc.getInputStream(), new FileOutputStream(buildFolder.getFile("ls.out").getLocation().toFile())); >+ proc.waitFor(); >+ >+ assertLogContainsLine(buildFolder.getFile("ls.out"), "-rwxr-xr-x"); >+ } > > assertLogContainsLines(ini, new String[] {"-vm", "myVm"}); > boolean duplicate = false;
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 282260
: 168036