summaryrefslogtreecommitdiff
path: root/chromium/tools/export_tarball
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2013-12-11 21:33:03 +0100
committerAndras Becsi <andras.becsi@digia.com>2013-12-13 12:34:07 +0100
commitf2a33ff9cbc6d19943f1c7fbddd1f23d23975577 (patch)
tree0586a32aa390ade8557dfd6b4897f43a07449578 /chromium/tools/export_tarball
parent5362912cdb5eea702b68ebe23702468d17c3017a (diff)
downloadqtwebengine-chromium-f2a33ff9cbc6d19943f1c7fbddd1f23d23975577.tar.gz
Update Chromium to branch 1650 (31.0.1650.63)
Change-Id: I57d8c832eaec1eb2364e0a8e7352a6dd354db99f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'chromium/tools/export_tarball')
-rwxr-xr-xchromium/tools/export_tarball/export_v8_tarball.py49
1 files changed, 38 insertions, 11 deletions
diff --git a/chromium/tools/export_tarball/export_v8_tarball.py b/chromium/tools/export_tarball/export_v8_tarball.py
index 30767b6287b..b232c0aee73 100755
--- a/chromium/tools/export_tarball/export_v8_tarball.py
+++ b/chromium/tools/export_tarball/export_v8_tarball.py
@@ -32,6 +32,10 @@ _V8_PATTERNS = [
_V8_BUILD_NUMBER_PATTERN,
_V8_PATCH_LEVEL_PATTERN]
+_NONESSENTIAL_DIRS = (
+ 'third_party/icu',
+)
+
def GetV8Version(v8_directory):
"""
@@ -63,11 +67,24 @@ def GetV8Directory():
# Workaround lack of the exclude parameter in add method in python-2.4.
# TODO(phajdan.jr): remove the workaround when it's not needed on the bot.
class MyTarFile(tarfile.TarFile):
+ def set_remove_nonessential_files(self, remove):
+ self.__remove_nonessential_files = remove
+
def add(self, name, arcname=None, recursive=True, exclude=None, filter=None):
head, tail = os.path.split(name)
if tail in ('.svn', '.git'):
return
+ if self.__remove_nonessential_files:
+ # Remove contents of non-essential directories, but preserve gyp files,
+ # so that build/gyp_chromium can work.
+ for nonessential_dir in _NONESSENTIAL_DIRS:
+ dir_path = os.path.join(GetV8Directory(), nonessential_dir)
+ if (name.startswith(dir_path) and
+ os.path.isfile(name) and
+ 'gyp' not in name):
+ return
+
tarfile.TarFile.add(self, name, arcname=arcname, recursive=recursive)
@@ -86,20 +103,30 @@ def main(argv):
v8_version = GetV8Version(v8_directory)
print 'Packaging V8 version %s...' % v8_version
- output_basename = 'v8-%s' % v8_version
- output_fullname = os.path.join(args[0], output_basename + '.tar.bz2')
-
- if os.path.exists(output_fullname):
- print 'Already packaged, exiting.'
- return 0
subprocess.check_call(["make", "dependencies"], cwd=v8_directory)
- archive = MyTarFile.open(output_fullname, 'w:bz2')
- try:
- archive.add(v8_directory, arcname=output_basename)
- finally:
- archive.close()
+ output_basename = 'v8-%s' % v8_version
+
+ # Package full tarball.
+ output_fullname = os.path.join(args[0], output_basename + '.tar.bz2')
+ if not os.path.exists(output_fullname):
+ archive = MyTarFile.open(output_fullname, 'w:bz2')
+ archive.set_remove_nonessential_files(False)
+ try:
+ archive.add(v8_directory, arcname=output_basename)
+ finally:
+ archive.close()
+
+ # Package lite tarball.
+ output_fullname = os.path.join(args[0], output_basename + '-lite.tar.bz2')
+ if not os.path.exists(output_fullname):
+ archive = MyTarFile.open(output_fullname, 'w:bz2')
+ archive.set_remove_nonessential_files(True)
+ try:
+ archive.add(v8_directory, arcname=output_basename)
+ finally:
+ archive.close()
return 0