From 68258b087964a1dfd272be12f8aa2b7ea4c36642 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 27 Oct 2005 10:02:24 +0000 Subject: Report curl download errors on ftp or on cancellation more agressively, so the urpm routines can recover properly. --- urpm/download.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/urpm/download.pm b/urpm/download.pm index d18f0395..78494081 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -307,7 +307,8 @@ sub sync_curl { }; } } - close $curl; + close $curl + or die N("curl failed: exited with %d or signal %d\n", $? >> 8, $? & 127); #- now analyse size and time stamp according to what already exists here. if (@ftp_files) { @@ -367,7 +368,7 @@ sub sync_curl { if (propagate_sync_callback($options, 'progress', $file, $percent, $total, $eta, $speed) eq 'canceled') { kill 15, $curl_pid; close $curl; - return; + die N("curl failed: download canceled\n"); } #- this checks that download has actually started if ($_ eq "\n" -- cgit v1.2.1