summaryrefslogtreecommitdiffstats
path: root/urpm/main_loop.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-10-21 16:22:38 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-10-21 16:22:38 +0000
commite1b77dc67dc7c350c5d3e6acd451785a9c78f340 (patch)
tree017302f0d6301141e1fd3771ba072a695ba2b011 /urpm/main_loop.pm
parent01508b09ee68c55499c1b1a5ea658bb03204b96c (diff)
downloadurpmi-e1b77dc67dc7c350c5d3e6acd451785a9c78f340.tar
urpmi-e1b77dc67dc7c350c5d3e6acd451785a9c78f340.tar.gz
urpmi-e1b77dc67dc7c350c5d3e6acd451785a9c78f340.tar.bz2
urpmi-e1b77dc67dc7c350c5d3e6acd451785a9c78f340.tar.xz
urpmi-e1b77dc67dc7c350c5d3e6acd451785a9c78f340.zip
- urpmi, gurpmi
o allow "retry" on aria2 download failure
Diffstat (limited to 'urpm/main_loop.pm')
-rw-r--r--urpm/main_loop.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm
index a8d9a2e5..fdb82717 100644
--- a/urpm/main_loop.pm
+++ b/urpm/main_loop.pm
@@ -101,6 +101,13 @@ foreach my $set (@{$state->{transaction} || []}) {
\@error_sources,
quiet => $options{verbose} < 0,
callback => $callbacks->{trans_log},
+ ask_retry => $callbacks->{ask_retry} || sub {
+ my ($raw_msg, $msg) = @_;
+ if (my $download_errors = delete $urpm->{download_errors}) {
+ $raw_msg = join("\n", @$download_errors, '');
+ }
+ $callbacks->{ask_yes_or_no}('', $raw_msg . "\n" . $msg . "\n" . N("Retry?"));
+ },
);
if (@error_sources) {
$_->[0] = urpm::download::hide_password($_->[0]) foreach @error_sources;