Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323907 - Branded ini missing in MacOS builds
Summary: Branded ini missing in MacOS builds
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Buckminster (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: buckminster.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-29 10:05 EDT by Thorsten Meinl CLA
Modified: 2019-02-25 14:40 EST (History)
2 users (show)

See Also:


Attachments
Patch to BrandingIron.java that fixed the problem (864 bytes, patch)
2010-08-29 10:06 EDT, Thorsten Meinl CLA
thomas: iplog+
Details | Diff
Fix for NPE (765 bytes, patch)
2010-10-01 09:33 EDT, Thorsten Meinl CLA
thomas: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Meinl CLA 2010-08-29 10:05:11 EDT
Build Identifier: I20100608-0911

If the application name is not eclipse but some other name, e.g. "knime" the p2 publisher does not find the branded ini-file:

java.io.FileNotFoundException: 
/tmp/p2.brandingIron3419713815157511588/knime.app/Contents/MacOS/knime.ini 
(Datei oder Verzeichnis nicht gefunden)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at 
org.eclipse.equinox.internal.p2.core.helpers.FileUtils.zipFile(FileUtils.java:357)
        at 
org.eclipse.equinox.internal.p2.core.helpers.FileUtils.zip(FileUtils.java:286)
        at 
org.eclipse.equinox.internal.p2.core.helpers.FileUtils.zip(FileUtils.java:251)
        at 
org.eclipse.equinox.p2.publisher.AbstractPublisherAction.publishArtifact(AbstractPublisherAction.java:469)
        at 
org.eclipse.equinox.p2.publisher.eclipse.EquinoxExecutableAction.publishExecutableIU(EquinoxExecutableAction.java:129)
        at 
org.eclipse.equinox.p2.publisher.eclipse.EquinoxExecutableAction.perform(EquinoxExecutableAction.java:66)
        at 
org.eclipse.equinox.p2.publisher.eclipse.ApplicationLauncherAction.perform(ApplicationLauncherAction.java:68)
        at 
org.eclipse.equinox.p2.publisher.eclipse.ProductAction.perform(ProductAction.java:91)
        at 
org.eclipse.buckminster.pde.tasks.ProductAction.perform(ProductAction.java:137)
        at 
org.eclipse.equinox.p2.publisher.Publisher$ArtifactProcess.run(Publisher.java:207)
        at 
org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.executeBatch(SimpleArtifactRepository.java:1034)
        at 
org.eclipse.equinox.p2.publisher.Publisher.publish(Publisher.java:231)
        at 
org.eclipse.buckminster.pde.internal.actor.P2SiteGenerator.run(P2SiteGenerator.java:333)
        at 
org.eclipse.buckminster.pde.internal.actor.P2SiteGenerator.internalPerform(P2SiteGenerator.java:430)
        at 
org.eclipse.buckminster.core.actor.AbstractActor.perform(AbstractActor.java:186)
        at 
org.eclipse.buckminster.core.internal.actor.PerformManager$DirectActionInvocation.execute(PerformManager.java:143)
        at 
org.eclipse.buckminster.core.internal.actor.PerformManager.internalPerform(PerformManager.java:454)
        at 
org.eclipse.buckminster.core.internal.actor.PerformManager.perform(PerformManager.java:293)
        at 
org.eclipse.buckminster.core.internal.actor.PerformManager.perform(PerformManager.java:305)
        at 
org.eclipse.buckminster.ui.InvokeAction$ActionJob.runInWorkspace(InvokeAction.java:81)
        at 
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

The reason is very likely a typo in BrandingIron.java (see patch below): the original file (before branding) is named "eclipse.ini" (at least on my Linux system) but the BrandingIron looks for "Eclipse.ini" and thus does not find and copy it over to the branded directory.

Reproducible: Always
Comment 1 Thorsten Meinl CLA 2010-08-29 10:06:17 EDT
Created attachment 177684 [details]
Patch to BrandingIron.java that fixed the problem
Comment 2 Thomas Hallgren CLA 2010-08-29 16:29:52 EDT
Patch applied with some modification. The logic will check for both Eclipse.ini and eclipse.ini. IIRC the former can be present under some circumstances. Don't remember which but I thought it saver to keep checking for both.

While fixing this I also changed some System.out.println() to proper logger calls. This will enable stack trace output in debug mode.

Applied to helios-maintencance, rev 11577.
Comment 3 Thorsten Meinl CLA 2010-10-01 09:33:03 EDT
It seems that in some rare cases my patch causes a NullPointerException (which is very hard to track down...). If the project containing the icons does not exists at all, a resource handle is returned, but the following call to findMember returns null which causes an NPE in the next line. This should be checked upon. Minor patch follows.
Comment 4 Thorsten Meinl CLA 2010-10-01 09:33:30 EDT
Created attachment 180053 [details]
Fix for NPE