aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-01-09 12:20:26 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-01-09 12:20:26 +0000
commitc40838c088c98ecf2472062edd2d73a134caf690 (patch)
tree7d6084ea0a0b017c4b0d711d7499c374b7f1a7be
parent1fa203d360e8fcb59b7a527dbaa1987ca7d95f5d (diff)
downloadrpmdrake-c40838c088c98ecf2472062edd2d73a134caf690.tar
rpmdrake-c40838c088c98ecf2472062edd2d73a134caf690.tar.gz
rpmdrake-c40838c088c98ecf2472062edd2d73a134caf690.tar.bz2
rpmdrake-c40838c088c98ecf2472062edd2d73a134caf690.tar.xz
rpmdrake-c40838c088c98ecf2472062edd2d73a134caf690.zip
grpmi: allow to retry downloads
-rwxr-xr-xgrpmi/grpmi.pl16
-rw-r--r--rpmdrake.spec1
2 files changed, 11 insertions, 6 deletions
diff --git a/grpmi/grpmi.pl b/grpmi/grpmi.pl
index 6d8745d5..848039fc 100755
--- a/grpmi/grpmi.pl
+++ b/grpmi/grpmi.pl
@@ -98,20 +98,24 @@ my $download_progress;
foreach my $arg (@ARGV) {
if ($arg =~ m,$url_regexp,) {
$download_progress++;
- $label->set(_("Downloading package `%s' (%s/%s)...", basename($arg), $download_progress, $nb_downloads));
+ my $url = $arg;
+ $arg = "$cache_location/" . basename($url);
+ retry_download:
+ $label->set(_("Downloading package `%s' (%s/%s)...", basename($url), $download_progress, $nb_downloads));
select(undef, undef, undef, 0.1); $mainw->flush; #- hackish :-(
- my $res = curl_download::download($arg, $cache_location,
+ my $res = curl_download::download($url, $cache_location,
sub { $_[0] and $progressbar->set_fraction($_[1]/$_[0]); $mainw->flush });
- my $url = $arg;
- $arg = "$cache_location/" . basename($arg);
if ($res) {
- interactive_msg(_("Error during download"),
+ my $results = interactive_msg(_("Error during download"),
_("There was an error downloading package:
%s
Error: %s
-Do you want to continue (skipping this package)?", $url, $res), 1) or goto cleanup;
+Do you want to continue (skipping this package)?", $url, $res),
+ [ _("Yes"), _("No"), _("Retry download") ]);
+ $results eq _("No") and goto cleanup;
+ $results eq _("Retry download") and goto retry_download;
$arg = "-skipped&$arg&";
}
}
diff --git a/rpmdrake.spec b/rpmdrake.spec
index e2bc6d68..9c9deac9 100644
--- a/rpmdrake.spec
+++ b/rpmdrake.spec
@@ -119,6 +119,7 @@ rm -rf $RPM_BUILD_ROOT
- grpmi:
- verify all signatures at the end of all downloads
- allow to say "yes to all" to the signatures questions
+ - allow to retry downloads
* Wed Jan 8 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1-1mdk
- gtk2 (possibly contains important breakages, use with care)