summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-07-11 01:22:18 +0530
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-07-10 21:53:01 +0000
commit66cae862bcef42a3ae18b258c6dfe8b9ab641063 (patch)
treee0f4945d7abc8b8d4aa6b8ce9c2d57cb3236ad66
parent328ed72888f8828ae7001c2d7e61ddcd2c71aa18 (diff)
cerbero: Rename --xz to --compress-method
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/540>
-rw-r--r--cerbero/commands/package.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/cerbero/commands/package.py b/cerbero/commands/package.py
index 457e760e..e44e6baa 100644
--- a/cerbero/commands/package.py
+++ b/cerbero/commands/package.py
@@ -63,9 +63,9 @@ class Package(Command):
default=False, help=_('Use only the source cache, no network')),
ArgparseArgument('--dry-run', action='store_true',
default=False, help=_('Only print the packages that will be built')),
- ArgparseArgument('--xz', action='store_true',
- default=False, help=_('Use xz instead of bzip2 for compression if '
- 'creating a tarball')),
+ ArgparseArgument('--compress-method', type=str,
+ choices=['default', 'xz', 'bz2'], default='default',
+ help=_('Select compression method for tarballs')),
ArgparseArgument('--jobs', '-j', action='store', type=int,
default=0, help=_('How many recipes to build concurrently. '
'0 = number of CPUs.')),
@@ -85,8 +85,9 @@ class Package(Command):
if args.only_build_deps or args.dry_run:
return
- if args.xz:
- config.package_tarball_compression = 'xz'
+ if args.compress_method != 'default':
+ m.message('Forcing tarball compression method as ' + args.compress_method)
+ config.package_tarball_compression = args.compress_method
if p is None:
raise PackageNotFoundError(args.package[0])