diff options
Diffstat (limited to 'lib/MGA')
-rw-r--r-- | lib/MGA/DrakISO/BuildLoop.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/MGA/DrakISO/BuildLoop.pm b/lib/MGA/DrakISO/BuildLoop.pm index ebaef11..d47b6e9 100644 --- a/lib/MGA/DrakISO/BuildLoop.pm +++ b/lib/MGA/DrakISO/BuildLoop.pm @@ -1,6 +1,6 @@ # Copyright (C) 2005 Mandriva # Olivier Blin <oblin@mandriva.com> -# Copyright (C) 2017-2018 Mageia +# Copyright (C) 2017-2020 Mageia # Martin Whitaker <mageia@martin-whitaker.me.uk> # # This program is free software; you can redistribute it and/or modify @@ -58,12 +58,17 @@ sub build_live_loopback_file { my @excluded_files = expand_file_list($build, @{$build->{loopbacks}{exclude} || []}); output_p($exclude_list, map { $root . "$_\n" } grep { run_as_root('test', '-e', $root . $_) } @excluded_files); + my ($compress_type, $compress_level) = split(':', $build->{loopbacks}{compression} || 'zstd:18'); + my $sort = $build->{settings}{config_root} . '/config/distrib.sort'; run_as_root(join(' ', 'mksquashfs', $root, $dest, '-noappend', - '-comp', 'xz', + '-comp', $compress_type, + if_($compress_type eq 'zstd' && $compress_level, + '-Xcompression-level', $compress_level + ), '-b', '1048576', '-ef', $exclude_list, if_(-f $sort, '-sort', $sort), |