Fixing the pv position regarding compression
Problem noticed by niksnut.
This commit is contained in:
parent
7391533ea5
commit
e6c44d166a
|
@ -46,7 +46,7 @@ sub copyTo {
|
||||||
if (scalar @missing > 0) {
|
if (scalar @missing > 0) {
|
||||||
print STDERR "copying ", scalar @missing, " missing paths to ‘$sshHost’...\n";
|
print STDERR "copying ", scalar @missing, " missing paths to ‘$sshHost’...\n";
|
||||||
unless ($dryRun) {
|
unless ($dryRun) {
|
||||||
open SSH, "| $compressor $progressViewer ssh $sshHost @{$sshOpts} '$decompressor nix-store --import' > /dev/null" or die;
|
open SSH, "| $progressViewer $compressor ssh $sshHost @{$sshOpts} '$decompressor nix-store --import' > /dev/null" or die;
|
||||||
exportPaths(fileno(SSH), $sign, @missing);
|
exportPaths(fileno(SSH), $sign, @missing);
|
||||||
close SSH or die "copying store paths to remote machine `$sshHost' failed: $?";
|
close SSH or die "copying store paths to remote machine `$sshHost' failed: $?";
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,7 @@ else { # Copy FROM the remote machine.
|
||||||
$decompressor = "$decompressor |" if $decompressor ne "";
|
$decompressor = "$decompressor |" if $decompressor ne "";
|
||||||
$progressViewer = "$progressViewer -s $missingSize |" if $progressViewer ne "";
|
$progressViewer = "$progressViewer -s $missingSize |" if $progressViewer ne "";
|
||||||
my $extraOpts = $sign ? "--sign" : "";
|
my $extraOpts = $sign ? "--sign" : "";
|
||||||
system("set -f; ssh $sshHost @sshOpts 'nix-store --export $extraOpts @missing $compressor' | $progressViewer $decompressor $Nix::Config::binDir/nix-store --import > /dev/null") == 0
|
system("set -f; ssh $sshHost @sshOpts 'nix-store --export $extraOpts @missing $compressor' | $decompressor $progressViewer $Nix::Config::binDir/nix-store --import > /dev/null") == 0
|
||||||
or die "copying store paths from remote machine `$sshHost' failed: $?";
|
or die "copying store paths from remote machine `$sshHost' failed: $?";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue