Bug 154069 - downgrade effort level on pack200
Summary: downgrade effort level on pack200
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Releng (show other bugs)
Version: 3.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Kim Moir CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-16 11:45 EDT by Grant Gayed CLA
Modified: 2006-12-27 11:39 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2006-08-16 11:45:29 EDT
See bug 153367 for the history of this problem.

I've spoken to Sonia and Kevin about this and it's agreed that the pack200 effort should be uniformly reduced to 4 for all builds (3.2.1 stream and 3.3 stream) on all platforms, for as long as a jdk that has the pack200 bug is being used for builds.

Also, Kevin suggested that an FYI should be sent to the callisto mailing list about this change to ensure that other apps running into this issue do not spend time re-investigating it.
Comment 1 Kim Moir CLA 2006-08-16 13:29:29 EDT
I'll see the note to the Callisto list.  Are we going to investigate using a newer vm to run the pack200 portion of the build to avoid this issue?
Comment 2 Grant Gayed CLA 2006-08-16 14:54:38 EDT
sounds like a good idea
Comment 3 Kim Moir CLA 2006-08-17 09:55:07 EDT
Sonia and I talked to Andrew about this issue yesterday.  The problem with using a newer vm is that the bug fix is only in 1.6 which is not scheduled for release until this fall.

Andrew thought of a workaround where we could use a shell script to pass the -E4 parameters to the pack200 executable directly instead of having to add the .inf files to each plugin.  I'm running test builds to integrate his suggestions into our build.
Comment 4 Andrew Niefer CLA 2006-08-17 11:47:53 EDT
For the record, the JarProcessor checks a system property named org.eclipse.update.jarprocessor.pack200 for the directory in which to find the pack200 executable to run. (By default, it will just use the one from the vm in which it is running).  The workaround is to use this property to point to a shell script which simply calls the real pack200 with the addition of the -E4 argument.

Comment 5 Kim Moir CLA 2006-08-23 13:55:31 EDT
To implement Andrew's solution, 
we modified the signMasterFeature target in 

org.eclipse.releng.eclipsebuilder/buildAll.xml

<target name="signMasterFeature" if="sign">
		<property name="archiveName" value="eclipse-master-${buildId}.zip" />
		<property name="packtmp" value="${buildDirectory}/packtmp" />
		<mkdir dir="${packtmp}" />	
		<move file="${buildDirectory}/${buildLabel}/${archiveName}" tofile="${packtmp}/${archiveName}"/>
		
		
	   <!-- update location of jvm arguments --> 
        <replace file="${eclipse.build.configs}/../../extras/pack200" token="@pack200@" value="${java15-home}/bin/pack200"/>
		<chmod file="${eclipse.build.configs}/../../extras/pack200" perm="755"/>

	   <!--pack200-->
	   <java jar="${eclipse.home}/startup.jar"
	   		fork="true"
			timeout="10800000"
			jvm="${java15-home}/bin/java"
			failonerror="true"
			maxmemory="512m"
			dir="${buildDirectory}">
			<jvmarg value="-Dorg.eclipse.update.jarprocessor.pack200=${eclipse.build.configs}/../../extras"/>
			<arg line="-application org.eclipse.update.core.siteOptimizer"/>
			<arg line="-jarProcessor -outputDir ${buildLabel} -processAll -pack -repack ${packtmp}/${archiveName}"/>
       </java>
	
		<delete dir="${packtmp}" />
	</target>

to point to the directory containing a pack200 shell script using the jvmarg value

org.eclipse.releng.eclipsebuilder/extras/pack200

#!/bin/sh

@pack200@ -E4 $*

pack200retCode=$?

if [ $pack200retCode != 0 ]
then
        echo "Build failed (error code $retCode)."
        exit -1
fi

calls the real pack200 with the -E4 parameter.

The @pack200@ token in the shell script is replaced during the build with the actual location of the pack200 script from the jdk.

This fix has been released to HEAD with tag v20060623a.

Comment 6 Kim Moir CLA 2006-08-24 16:48:52 EDT
Fixed released to HEAD and R3_2_maintenance stream for upcoming builds.
Comment 7 Xiaoying Gu CLA 2006-12-27 04:40:47 EST
But if I plan to create pack200 on Windows using this org.eclipse.update.jarprocessor.pack200 property, does windows script also works?

I tried to create a pack200.bat which calls the pack200 in vm with -E4 switch,
it always throw error message: Application Started: 1250
The pack200 command cannot be found.

Does this could be used only on Linux OS?
Comment 8 Andrew Niefer CLA 2006-12-27 11:39:52 EST
The script that is called will be platform and shell specific.

It should work on windows, note that you provide the directory using the property and the jar processor will call "pack200" from there.

If you use a recent version of org.eclipse.update.core, there is a simpler way to change the effort level.  See the wiki: http://wiki.eclipse.org/index.php/JarProcessor_Options
In particular, the "pack200.args" property in the eclipse.inf file or the "pack200.default.args" property in the pack.properties file.

See also http://wiki.eclipse.org/index.php/Pack200