summaryrefslogtreecommitdiffstats
path: root/build/bin
diff options
context:
space:
mode:
authorMarko Grönroos <magi@iki.fi>2009-10-05 14:49:48 +0000
committerMarko Grönroos <magi@iki.fi>2009-10-05 14:49:48 +0000
commitd1bf0de1161299f7211af688917c00b95b8ca7f4 (patch)
treeaf9469ef3779f5e0f3b3be3cb2e07d28c4ecfea9 /build/bin
parent3ff19e88ef92d09c71ee1710fbb13267415201cb (diff)
downloadvaadin-framework-d1bf0de1161299f7211af688917c00b95b8ca7f4.tar.gz
vaadin-framework-d1bf0de1161299f7211af688917c00b95b8ca7f4.zip
Merge from 6.1 to 6.2:
Merged [9084]: List also differences between packaged Vaadin JARs. Merged [9085]: Formatting fix in package differences listing script. svn changeset:9088/svn branch:6.2
Diffstat (limited to 'build/bin')
-rwxr-xr-xbuild/bin/package-diff.py49
1 files changed, 49 insertions, 0 deletions
diff --git a/build/bin/package-diff.py b/build/bin/package-diff.py
index 74ca550aa0..de479ca8b4 100755
--- a/build/bin/package-diff.py
+++ b/build/bin/package-diff.py
@@ -57,6 +57,36 @@ def diffFiles(a, b):
return difffiles
################################################################################
+# Lists files inside a Zip file (a JAR)
+################################################################################
+def listZipFiles(zipfile):
+ # Read the zip content listing
+ pin = os.popen("unzip -ql %s" % zipfile, "r")
+ lines = map(lambda x: x[:-1], pin.readlines())
+ pin.close()
+
+ # Determine the position of file names
+ namepos = lines[0].find("Name")
+ files = []
+ for i in xrange(2, len(lines)-2):
+ filename = lines[i][namepos:]
+ files.append(filename)
+
+ return files
+
+################################################################################
+# Lists files inside a Vaadin Jar inside a Tar
+################################################################################
+def listTarVaadinJarFiles(tarfile, vaadinversion):
+ jarfile = "vaadin-linux-%s/WebContent/vaadin-%s.jar" % (vaadinversion, vaadinversion)
+ extractedjar = "/tmp/vaadinjar-tmp-%d.jar" % (os.getpid())
+ tarcmd = "tar zOxf %s %s > %s " % (tarfile, jarfile, extractedjar)
+ command (tarcmd)
+ files = listZipFiles(extractedjar)
+ command ("rm %s" % (extractedjar))
+ return files
+
+################################################################################
#
################################################################################
@@ -98,6 +128,8 @@ builtfiles = listfiles(builtpackage)
# Report differences
+print "\n--------------------------------------------------------------------------------\nVaadin TAR differences"
+
# New files
newfiles = diffFiles(builtfiles, latestfiles)
print "\n%d new files:" % (len(newfiles))
@@ -110,5 +142,22 @@ print "\n%d removed files:" % (len(removed))
for item in removed:
print item
+print "\n--------------------------------------------------------------------------------\nVaadin JAR differences"
+
+latestJarFiles = listTarVaadinJarFiles(locallinuxpackage, latestversion)
+builtJarFiles = listTarVaadinJarFiles(builtpackage, builtversion)
+
+# New files
+newfiles = diffFiles(builtJarFiles, latestJarFiles)
+print "\n%d new files:" % (len(newfiles))
+for item in newfiles:
+ print item
+
+# Removed files
+removed = diffFiles(latestJarFiles, builtJarFiles)
+print "\n%d removed files:" % (len(removed))
+for item in removed:
+ print item
+
# Purge downloaded package
command("rm %s" % (locallinuxpackage))