Bug 178717 - Create resulting archive in one step
Summary: Create resulting archive in one step
Status: NEW
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 177677
Blocks: 87808 142792
  Show dependency tree
 
Reported: 2007-03-21 23:47 EDT by Barrie Treloar CLA
Modified: 2018-12-03 09:13 EST (History)
0 users

See Also:


Attachments
Patch for enhancement (37.69 KB, patch)
2007-03-22 00:08 EDT, Barrie Treloar CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Barrie Treloar CLA 2007-03-21 23:47:46 EDT
Build ID: 3.2

If you have a large product build (100Mb or more) then your build takes longer than is necessary because the zip tasks are invoked multiple times using the "update" flag, which essentially copies the file to a new file each time the zip task is run.

Steps To Reproduce:
1. Create a product build file.
2. Run the PDE build
3. Open the assemble.org.eclipse.pde.build.container.feature.win32.win32.x86.xml and you will see that in the main target there are multiple zip tasks all updating the one destfile.

e.g.

		<zip destfile="${archiveFullPath}" filesonly="false" whenempty="skip" update="true">
			<zipfileset file="${eclipse.base}/plugins/test.pde.plugin_1.0.0.jar" fullpath="${pluginArchivePrefix}/test.pde.plugin_1.0.0.jar"			/>
		</zip>
		<zip destfile="${archiveFullPath}" filesonly="false" whenempty="skip" update="true">
			<zipfileset dir="${eclipse.base}/win32.win32.x86/${collectingFolder}" includes="**/**" excludes="${launcherName}" prefix="${archivePrefix}"			/>
			<zipfileset file="${eclipse.base}/win32.win32.x86/${collectingFolder}/${launcherName}" fullpath="${archivePrefix}/${launcherName}" filemode="755"			/>
		</zip>


What should be happening is that there is one zip task with all the filesets needed within that task, e.g:

		<zip destfile="${archiveFullPath}" filesonly="false" whenempty="skip" update="true">
			<zipfileset file="${eclipse.base}/plugins/test.pde.plugin_1.0.0.jar" fullpath="${pluginArchivePrefix}/test.pde.plugin_1.0.0.jar"			/>
			<zipfileset dir="${eclipse.base}/win32.win32.x86/${collectingFolder}" includes="**/**" excludes="${launcherName}" prefix="${archivePrefix}"			/>
			<zipfileset file="${eclipse.base}/win32.win32.x86/${collectingFolder}/${launcherName}" fullpath="${archivePrefix}/${launcherName}" filemode="755"			/>
		</zip>


The attached patch, with integration tests (depends upon 177677 being implemented) fixes this issue.
Comment 1 Barrie Treloar CLA 2007-03-22 00:07:50 EDT
I realised I had an older version of PDE, so I have updated this to the 3.2.2 build.

Comment 2 Barrie Treloar CLA 2007-03-22 00:08:48 EDT
Created attachment 61640 [details]
Patch for enhancement
Comment 3 Andrew Niefer CLA 2007-03-28 17:46:37 EDT
To clarify, we want one call to create the resulting archive file.  This must work for all the archive formats and across the assemble / package boundary.

(I have not yet looked at the attached patch, is it only for zip or does it do the other formats as well?)
Comment 4 Barrie Treloar CLA 2007-03-28 18:22:52 EDT
It does it for AntZip only at this stage, it was the only one I was trying.

I have modified the Zip generation as well, but for some reason there is code in there to break up the arguments into lots of no more than 15 arguments, so I have just refactored it to make it easier to understand.

I do have integration tests for those too.

I'm at home at the moment, so I don't know what was done for AntTar. I figured a partial fix was better than no fix and really can't see why anyone would use AntTar.  Zip is available on all platforms.
Comment 5 Barrie Treloar CLA 2007-03-28 18:25:08 EDT
Also the assemble/package has not been modified.
It behaves exactly as before it just means only one call to Ant's Zip per assemble or package is done instead of the many calls that currently are done.

So at worst you get two Zip's happening, one for assemble and then another one for package.


Comment 6 Lars Vogel CLA 2018-12-03 09:13:22 EST
Currently we are not actively enhancing PDE build anymore. Therefore, I close this bug as WONTFIX. 

Please reopen, if you plan to provide a fix.
Comment 7 Lars Vogel CLA 2018-12-03 09:13:48 EST
Currently we are not actively enhancing PDE build anymore. Therefore, I close this bug as WONTFIX. 

Please reopen, if you plan to provide a fix.