summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm.pm10
-rwxr-xr-xurpmi28
-rw-r--r--urpmi.spec6
3 files changed, 27 insertions, 17 deletions
diff --git a/urpm.pm b/urpm.pm
index 9e1382de..de096572 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -230,8 +230,14 @@ sub sync_rsync {
-x "/usr/bin/rsync" or die _("rsync is missing\n");
-x "/usr/bin/ssh" or die _("ssh is missing\n");
my $options = shift @_;
- system "/usr/bin/rsync", (ref $options && $options->{quiet} ? ("-q") : ("--progress", "-v")), "--partial", "-e", "ssh",
- @_, (ref $options ? $options->{dir} : $options);
+ foreach (@_) {
+ my $count = 3; #- retry count on error (if file exists).
+ my $basename = (/^.*\/([^\/]*)$/ && $1) || $_;
+ do {
+ system "/usr/bin/rsync", (ref $options && $options->{quiet} ? ("-q") : ("--progress", "-v")), "--partial", "-e", "ssh",
+ $_, (ref $options ? $options->{dir} : $options);
+ } while ($? != 0 && --$count > 0 && (-e (ref $options ? $options->{dir} : $options) . "/$basename"));
+ }
$? == 0 or die _("rsync failed: exited with %d or signal %d\n", $? >> 8, $? & 127);
}
diff --git a/urpmi b/urpmi
index d1dae756..04cfc9ab 100755
--- a/urpmi
+++ b/urpmi
@@ -334,21 +334,21 @@ sub ask_choice {
}
$urpm->resolve_requested($db, $state, callback_choices => \&ask_choice);
+}
- if (%{$state->{ask_unselect} || {}}) {
- my $list = join "\n", map { $urpm->{depslist}[$_]->fullname } keys %{$state->{ask_unselect}};
- $noexpr = _("Nn");
- $yesexpr = _("Yy");
- message_input(_("Some package requested cannot be installed:\n%s\ndo you agree ?", $list) . _(" (Y/n) ")) =~ /[$noexpr]/ and exit 0;
- delete @{$state->{selected}}{keys %{$state->{ask_unselect}}};
- }
- if (%{$state->{ask_remove} || {}}) {
- my $list = join "\n", keys %{$state->{ask_remove}};
- $noexpr = _("Nn");
- $yesexpr = _("Yy");
- message_input(_("Some package have to be removed for others to be upgraded:\n%s\ndo you agree ?", $list) . _(" (Y/n) ")) =~ /[$noexpr]/ and exit 0;
- system("rpm", "-e", "--nodeps", keys %{$state->{ask_remove}}, ($root ? ("--root", $root) : ()));
- }
+if (%{$state->{ask_unselect} || {}}) {
+ my $list = join "\n", map { $urpm->{depslist}[$_]->fullname } keys %{$state->{ask_unselect}};
+ $noexpr = _("Nn");
+ $yesexpr = _("Yy");
+ message_input(_("Some package requested cannot be installed:\n%s\ndo you agree ?", $list) . _(" (Y/n) ")) =~ /[$noexpr]/ and exit 0;
+ delete @{$state->{selected}}{keys %{$state->{ask_unselect}}};
+}
+if (%{$state->{ask_remove} || {}}) {
+ my $list = join "\n", keys %{$state->{ask_remove}};
+ $noexpr = _("Nn");
+ $yesexpr = _("Yy");
+ message_input(_("Some package have to be removed for others to be upgraded:\n%s\ndo you agree ?", $list) . _(" (Y/n) ")) =~ /[$noexpr]/ and exit 0;
+ system("rpm", "-e", "--nodeps", keys %{$state->{ask_remove}}, ($root ? ("--root", $root) : ()));
}
#- get out of package that should not be upgraded.
diff --git a/urpmi.spec b/urpmi.spec
index 17a0a340..4eff4a0f 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -2,7 +2,7 @@
Name: urpmi
Version: 3.6
-Release: 2mdk
+Release: 3mdk
License: GPL
Source0: %{name}.tar.bz2
Source1: %{name}.logrotate
@@ -144,6 +144,10 @@ fi
%changelog
+* Fri Jun 28 2002 François Pons <fpons@mandrakesoft.com> 3.6-3mdk
+- fix deadlock on removing package.
+- fix rsync download for mulitples files.
+
* Thu Jun 27 2002 François Pons <fpons@mandrakesoft.com> 3.6-2mdk
- added rsync:// and ssh:// protocol to urpmi.