diff options
| author | Nicolas Vigier <boklm@torproject.org> | 2019-11-20 16:44:13 +0100 |
|---|---|---|
| committer | Nicolas Vigier <boklm@torproject.org> | 2019-11-20 16:56:43 +0100 |
| commit | dad4ab355d754d650d5d6ad2cccd9931b931c0ff (patch) | |
| tree | 23078bb20e026656f1e060f9e4ef23d306b9fb73 | |
| parent | 5a41aae4a0d745f74b675d3c9c142b3d5fb3ca09 (diff) | |
Bug 32527: Don't leave partially downloaded files in case of errorbug_32527_v2
| -rw-r--r-- | lib/RBM/DefaultConfig.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/RBM/DefaultConfig.pm b/lib/RBM/DefaultConfig.pm index f7de8bb..974a0e1 100644 --- a/lib/RBM/DefaultConfig.pm +++ b/lib/RBM/DefaultConfig.pm @@ -555,7 +555,13 @@ OPT_END return $install{"$distro-$release"} if $install{"$distro-$release"}; return $install{$distro}; }, - urlget => 'wget -O[% shell_quote(dest_dir _ "/" _ c("filename")) %] [% shell_quote(c("URL")) %]', + urlget => <<URLGET, +#!/bin/sh +set -e +tmpfile="\$(mktemp -p [% shell_quote(c("tmp_dir")) %])" +wget -O"\$tmpfile" [% shell_quote(c("URL")) %] +mv -f "\$tmpfile" [% shell_quote(dest_dir _ "/" _ c("filename")) %] +URLGET sig_ext => [ qw(gpg asc sig) ], enable => 1, gnu_utils => sub { |
