diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-03 23:42:13 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-03 23:42:13 +0000 |
commit | 826b3229c6d879fab744cfa1201d9ae654df0752 (patch) | |
tree | df3b7d7f4d3040a67efd5256136d15401e46b98d /tools/export_tarball | |
parent | 12395ba84b7e33fe936e7be1bb36deccdcc32e1a (diff) | |
download | chromium_src-826b3229c6d879fab744cfa1201d9ae654df0752.zip chromium_src-826b3229c6d879fab744cfa1201d9ae654df0752.tar.gz chromium_src-826b3229c6d879fab744cfa1201d9ae654df0752.tar.bz2 |
Always use XZ compression in export_tarball.
The command-line switch is for now preserved for backward compatibility.
BUG=none
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/14634005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198246 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/export_tarball')
-rwxr-xr-x | tools/export_tarball/export_tarball.py | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/tools/export_tarball/export_tarball.py b/tools/export_tarball/export_tarball.py index de8edb5..a13a1ca 100755 --- a/tools/export_tarball/export_tarball.py +++ b/tools/export_tarball/export_tarball.py @@ -116,13 +116,14 @@ def main(argv): dest="remove_nonessential_files", action="store_true", default=False) parser.add_option("--test-data", action="store_true") + # TODO(phajdan.jr): Remove --xz option when it's not needed for compatibility. parser.add_option("--xz", action="store_true") options, args = parser.parse_args(argv) if len(args) != 1: print 'You must provide only one argument: output file name' - print '(without .tar.bz2 extension).' + print '(without .tar.xz extension).' return 1 if not os.path.exists(GetSourceDirectory()): @@ -135,17 +136,10 @@ def main(argv): print 'Could not run build/util/lastchange.py to update LASTCHANGE.' return 1 - if options.xz: - output_fullname = args[0] + '.tar' - else: - output_fullname = args[0] + '.tar.bz2' - + output_fullname = args[0] + '.tar' output_basename = options.basename or os.path.basename(args[0]) - if options.xz: - archive = MyTarFile.open(output_fullname, 'w') - else: - archive = MyTarFile.open(output_fullname, 'w:bz2') + archive = MyTarFile.open(output_fullname, 'w') archive.set_remove_nonessential_files(options.remove_nonessential_files) try: if options.test_data: @@ -157,10 +151,9 @@ def main(argv): finally: archive.close() - if options.xz: - if subprocess.call(['xz', '-9', output_fullname]) != 0: - print 'xz -9 failed!' - return 1 + if subprocess.call(['xz', '-9', output_fullname]) != 0: + print 'xz -9 failed!' + return 1 return 0 |