diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-11 21:49:23 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-11 21:49:23 +0000 |
commit | 5e150c2eaa819712f42341c2d926ee9baa394499 (patch) | |
tree | 38e523e6ff95bce61257bb7897064de1394b1847 /tools/export_tarball/export_tarball.py | |
parent | 6e987b7a098a32e9f4239fe94212511f07f24cb3 (diff) | |
download | chromium_src-5e150c2eaa819712f42341c2d926ee9baa394499.zip chromium_src-5e150c2eaa819712f42341c2d926ee9baa394499.tar.gz chromium_src-5e150c2eaa819712f42341c2d926ee9baa394499.tar.bz2 |
Tweak export_tarball tool:
- remove sqlite test data in its new directory
- remove WebKit change logs to save ~10 MB in tarball size
- fix for python2.7+
BUG=none
Review URL: https://codereview.chromium.org/11506014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172417 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/export_tarball/export_tarball.py')
-rwxr-xr-x | tools/export_tarball/export_tarball.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/export_tarball/export_tarball.py b/tools/export_tarball/export_tarball.py index 8a9cbb0..04b9b3a 100755 --- a/tools/export_tarball/export_tarball.py +++ b/tools/export_tarball/export_tarball.py @@ -46,6 +46,7 @@ NONESSENTIAL_DIRS = ( 'third_party/hunspell_dictionaries', 'third_party/hunspell/tests', 'third_party/lighttpd', + 'third_party/sqlite/src/test', 'third_party/sqlite/test', 'third_party/vc_80', 'third_party/xdg-utils/tests', @@ -82,12 +83,17 @@ 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): + 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: + # WebKit change logs take quite a lot of space. This saves ~10 MB + # in a bzip2-compressed tarball. + if 'ChangeLog' in name: + return + for nonessential_dir in NONESSENTIAL_DIRS: dir_path = os.path.join(GetSourceDirectory(), nonessential_dir) if name.startswith(dir_path): |