summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-23 06:43:28 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-23 06:43:28 +0000
commit318b422a58703c1665ddec419d3b5f4b03ccb34d (patch)
treeac35733dda98901b1053acb24ee410472ac8ebf4
parenta41b9605fcd93c1e5faef1da83796a4add883461 (diff)
downloaddrakx-318b422a58703c1665ddec419d3b5f4b03ccb34d.tar
drakx-318b422a58703c1665ddec419d3b5f4b03ccb34d.tar.gz
drakx-318b422a58703c1665ddec419d3b5f4b03ccb34d.tar.bz2
drakx-318b422a58703c1665ddec419d3b5f4b03ccb34d.tar.xz
drakx-318b422a58703c1665ddec419d3b5f4b03ccb34d.zip
(setPackages) show all errors at once when setting media
-rw-r--r--perl-install/install/NEWS1
-rw-r--r--perl-install/install/any.pm20
2 files changed, 16 insertions, 5 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 291d3e4b8..f9a5da586 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,4 @@
+- show all errors at once when setting media
- fix settings 'suggests' properly according to 'no_suggests'
(aka default to suggests enabled)
regression intoduced in 14.23
diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm
index 401fae702..89c0b0b14 100644
--- a/perl-install/install/any.pm
+++ b/perl-install/install/any.pm
@@ -322,13 +322,23 @@ sub setPackages {
my $media = $o->{media} || [ { type => 'media_cfg', url => 'drakx://media' } ];
- my ($suppl_method, $copy_rpms_on_disk) = install::media::get_media($o, $media, $o->{packages});
-
- if ($suppl_method) {
- 1 while $o->selectSupplMedia;
+ {
+ my @errors;
+ local $::o->{packages}{error} = sub {
+ log::l("urpmi error: $_[0]");
+ push @errors, @_;
+ };
+ my ($suppl_method, $copy_rpms_on_disk) = install::media::get_media($o, $media, $o->{packages});
+
+ if ($suppl_method) {
+ 1 while $o->selectSupplMedia;
+ }
+ install::media::configure_media($o->{packages});
+ if (@errors) {
+ $::o->ask_warn(undef, N("An error occurred:") . "\n\n" . join("\n", @errors));
+ }
}
- install::media::configure_media($o->{packages});
install::media::adjust_paths_in_urpmi_cfg($o->{packages});
log::l('urpmi completely set up');