Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cross-project-issues-dev] Need help with pack200


I face two problems with pack200 when trying to compress the packages for TPTP.  If someone has a similar experience but has a solution, please help me out.  Please also let me know if you think I'm doing something wrong.

The first problem is about file permissions.  From the documentation of pack200, you can find this quote: "By default, the packer does not change the order of JAR elements. Also, the modification time and deflation hint of each JAR element is passed unchanged. (Any other ZIP-archive information, such as extra attributes giving Unix file permissions, are lost.)"

I learned about this limitation the hard way.  I condition the jar files (at least for TPTP) in the postAssemble step of the PDE build, after PDE creates all the feature zip files, but before we slice and dice the features into zipfiles for download.  Since the same feature can end up in more than one package (such as runtime, sdk, etc.), doing the conditioning before the packaging step can avoid conditioning the same jar file several times.  However, if I do this, the file mode of all files and directories in the final zip files become 000.  That is, all read, write and execute permissions are gone.  I noticed WTP does the conditioning in the postPackage step, which is equivalent to doing the conditioning on the final zip files.  I tried that too, and the result was that the read and write permissions flags are set, but all execute flags are lost.  There are some operating system specific files which I took special care to make sure the execute permission is set, but that's gone after pack200.  


The second problem I found was an error returned when repacking (or packing) some of our jar files.  For example:
     [exec] Extracting eclipse/plugins/org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar
     [exec] Running Repack on /public/TPTP/4.2.0/TPTP-4.2.0-200606110100/temp_tptp.platform.sdk-TPTP-4.2.0-200606110100.zip/eclipse/plugins/org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar
     [exec] Error: 1 was returned from command: /opt/ibm/jdk1.5.0_06/jre/bin/pack200 -r /public/TPTP/4.2.0/TPTP-4.2.0-200606110100/temp_tptp.platform.sdk-TPTP-4.2.0-200606110100.zip/temp_org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar /public/TPTP/4.2.0/TPTP-4.2.0-200606110100/temp_tptp.platform.sdk-TPTP-4.2.0-200606110100.zip/temp.org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar/org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar
     [exec] Adding eclipse/plugins/org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar to /public/TPTP/4.2.0/TPTP-4.2.0-200606110100/tptp.platform.sdk-TPTP-4.2.0-200606110100.zip.temp

I could not find any documentation on this error code.  A possible reason of the error is that this plugin contains some examples plugins, which contain a MANIFEST.MF file for each example, and the packer is somehow confused.  


_________________________
Hubert Leung
IBM Toronto Lab
hkyleung@xxxxxxxxxx
905-413-3382

Back to the top