forked from josch/mmdebstrap
Fix parallel xz compression
This commit is contained in:
parent
aad36777e8
commit
9f2ea61265
1 changed files with 1 additions and 6 deletions
|
@ -161,7 +161,7 @@ sub get_tar_compressor($) {
|
||||||
} elsif ($filename =~ /\.lz4$/) {
|
} elsif ($filename =~ /\.lz4$/) {
|
||||||
return 'lz4';
|
return 'lz4';
|
||||||
} elsif ($filename =~ /\.(xz|txz)$/) {
|
} elsif ($filename =~ /\.(xz|txz)$/) {
|
||||||
return 'xz';
|
return ('xz', '--threads=0');
|
||||||
} elsif ($filename =~ /\.zst$/) {
|
} elsif ($filename =~ /\.zst$/) {
|
||||||
return 'zstd';
|
return 'zstd';
|
||||||
}
|
}
|
||||||
|
@ -2443,11 +2443,6 @@ sub main() {
|
||||||
my $exitstatus = 0;
|
my $exitstatus = 0;
|
||||||
my @taropts = ('--sort=name', "--mtime=\@$mtime", '--clamp-mtime', '--numeric-owner', '--one-file-system', '-c', '--exclude=./dev');
|
my @taropts = ('--sort=name', "--mtime=\@$mtime", '--clamp-mtime', '--numeric-owner', '--one-file-system', '-c', '--exclude=./dev');
|
||||||
|
|
||||||
# Use parallel xz compression
|
|
||||||
if (defined $tar_compressor and $tar_compressor eq 'xz') {
|
|
||||||
push @taropts, '-Ixz --threads=0'
|
|
||||||
}
|
|
||||||
|
|
||||||
# disable signals so that we can fork and change behaviour of the signal
|
# disable signals so that we can fork and change behaviour of the signal
|
||||||
# handler in the parent and child without getting interrupted
|
# handler in the parent and child without getting interrupted
|
||||||
my $sigset = POSIX::SigSet->new(SIGINT, SIGHUP, SIGPIPE, SIGTERM);
|
my $sigset = POSIX::SigSet->new(SIGINT, SIGHUP, SIGPIPE, SIGTERM);
|
||||||
|
|
Loading…
Reference in a new issue