summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-12-11 14:27:31 +0000
committerFrancois Pons <fpons@mandriva.com>2002-12-11 14:27:31 +0000
commitd75e00d8f4ec0583bc5a5e3152fd4fbe140779e7 (patch)
tree8fb2a77491189075ba43626a2b4bf1315df79de0
parent4ecc11492e9490666f477b0de46ccef30fad855e (diff)
downloadurpmi-d75e00d8f4ec0583bc5a5e3152fd4fbe140779e7.tar
urpmi-d75e00d8f4ec0583bc5a5e3152fd4fbe140779e7.tar.gz
urpmi-d75e00d8f4ec0583bc5a5e3152fd4fbe140779e7.tar.bz2
urpmi-d75e00d8f4ec0583bc5a5e3152fd4fbe140779e7.tar.xz
urpmi-d75e00d8f4ec0583bc5a5e3152fd4fbe140779e7.zip
4.1-13mdk
-rw-r--r--urpm.pm16
-rw-r--r--urpme2
-rw-r--r--urpmi.spec6
3 files changed, 17 insertions, 7 deletions
diff --git a/urpm.pm b/urpm.pm
index b6f3911a..18133456 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -1943,7 +1943,7 @@ sub get_source_packages {
#- return a list of package ready for rpm.
sub download_source_packages {
my ($urpm, $local_sources, $list, %options) = @_;
- my (%sources, %removables);
+ my (%sources, %error_sources, %removables);
#- make sure everything is correct on input...
@{$urpm->{media} || []} == @$list or return;
@@ -2085,17 +2085,23 @@ sub download_source_packages {
};
if ($@) {
$urpm->{log}(_("...retrieving failed: %s", $@));
- delete @sources{keys %distant_sources};
+ #delete @sources{keys %distant_sources};
}
- #- clean files that have not been downloaded.
+ #- clean files that have not been downloaded, but keep mind there
+ #- has been problem downloading them at least once, this is
+ #- necessary to keep track of failing download in order to
+ #- present the error to the user.
foreach (keys %distant_sources) {
- -s $sources{$_} or delete $sources{$_};
+ -s $sources{$_} or $error_sources{$_} = delete $sources{$_};
}
}
}
+ #- clean failed download which have succeeded.
+ delete @error_sources{keys %sources};
+
#- return the hash of rpm file that have to be installed, they are all local now.
- %$local_sources, %sources;
+ %$local_sources, %sources, %error_sources;
}
#- extract package that should be installed instead of upgraded,
diff --git a/urpme b/urpme
index 8442e4a7..d8244f49 100644
--- a/urpme
+++ b/urpme
@@ -189,7 +189,7 @@ if (@toremove > @l && !$auto) {
$sum += $state->{ask_remove}{$_}{size};
}
my $msg = _("To satisfy dependencies, the following packages are going to be removed (%d MB)", toMb($sum));
- print STDOUT "$msg:\n@toremove\n$askok" . _(" (Y/n) ");
+ print STDOUT "$msg:\n" . join("\n", sort { $a cmp $b } @toremove) . "\n$askok" . _(" (Y/n) ");
<STDIN> =~ /[$noexpr]/ and exit 0;
}
diff --git a/urpmi.spec b/urpmi.spec
index bc7fa0d7..84b543ce 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -2,7 +2,7 @@
Name: urpmi
Version: 4.1
-Release: 12mdk
+Release: 13mdk
License: GPL
Source0: %{name}.tar.bz2
Source1: %{name}.logrotate
@@ -204,6 +204,10 @@ fi
%changelog
+* Wed Dec 11 2002 François Pons <fpons@mandrakesoft.com> 4.1-13mdk
+- fixed error management about missing files after download.
+- fixed urpme dependencies output to be user friendly.
+
* Wed Dec 11 2002 François Pons <fpons@mandrakesoft.com> 4.1-12mdk
- fix symlink download with wget.
- urpme now print possible errors.