Revision: 8864
Author: [email protected]
Date: Fri Sep 24 08:04:50 2010
Log: explicitly set the external_attr on the zipinfo to prevent creating an archive with empty permissions also, make the version string pattern a bit more lenient
since the newer jars have changed their format.

Review by: fabbott

http://code.google.com/p/google-web-toolkit/source/detail?r=8864

Modified:
 /tools/lib/eclipse/update-jdt.py

=======================================
--- /tools/lib/eclipse/update-jdt.py    Wed Apr  1 16:40:08 2009
+++ /tools/lib/eclipse/update-jdt.py    Fri Sep 24 08:04:50 2010
@@ -1,21 +1,4 @@
-# ----------------------------------------------------------------------------
-# NOTE NOTE NOTE!
-# This script is out of date.  We now require Ant support so that we can
-# compile JSPs in hosted mode.  We need to modify this to include:
-#
-# org.eclipse.jdt.core.JDTCompilerAdapter
-# org.eclipse.jdt.internal.antadapter.*
-#
-# Also, it's worth noting that Eclipse now offers a "JDT Core Batch Compiler".
-# We should look at using this standalone compiler as-is.  Example:
-# http://download.eclipse.org/eclipse/downloads/drops/R-3.4.2-200902111700/index.php#JDTCORE
-#
-# Other things we have to do when updating JDT:
-# - Update all overrides of CompilerImpl.process()
-# - Update any shadowed JDT classes
-# - Check to see if there are new JDT compiler options to tweak
-# ----------------------------------------------------------------------------
-#
+#!/usr/bin/python2.4
 # update-jdt.py
 #
 # This script is used to massage a JDT jar from Eclipse
@@ -31,10 +14,6 @@
 import sys
 import zipfile

-print "This script is out of date, see note at top!"
-print "(Remove these lines if you really know what you're doing)"
-sys.exit(1)
-
 # White listing
 jarWhitelist = [
     "about.html",
@@ -84,7 +63,7 @@

 print "long version: " + version

-shortVersionPattern = re.compile(r"([0-9]+\.[0-9]+\.[0-9]+)\.v_[0-9]+_R[0-9]+x")
+shortVersionPattern = re.compile(r"([0-9]+\.[0-9]+\.[0-9]+)\.v.*")
 shortVersion = shortVersionPattern.match(version).group(1)

 print "short version: " + shortVersion
@@ -103,6 +82,7 @@
             data = inzip.read(info.filename)
             outinfo = zipfile.ZipInfo(filename=info.filename,
                                       date_time=info.date_time)
+            outinfo.external_attr = 0600 << 16L #fixup permissions
             outinfo.compress_type = zipfile.ZIP_DEFLATED
             outzip.writestr(outinfo, data)

@@ -121,4 +101,3 @@
 jdtzip.writestr(zipfile.ZipInfo(filename="org/eclipse/jdt/version.txt"),
                 "version " + version + "\n")
 jdtzip.close()
-

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to