diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-03-21 11:55:48 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-03-21 11:55:48 +0000 |
commit | ac0cfd4a58730ee693cf1f94960b68c7b4ac4314 (patch) | |
tree | 9f09905bc93014721d064da9d57ecca1a9448e6f /Rpmdrake | |
parent | 478d7474f1c8af355a356d52dcf96084cff4c7f1 (diff) | |
download | rpmdrake-ac0cfd4a58730ee693cf1f94960b68c7b4ac4314.tar rpmdrake-ac0cfd4a58730ee693cf1f94960b68c7b4ac4314.tar.gz rpmdrake-ac0cfd4a58730ee693cf1f94960b68c7b4ac4314.tar.bz2 rpmdrake-ac0cfd4a58730ee693cf1f94960b68c7b4ac4314.tar.xz rpmdrake-ac0cfd4a58730ee693cf1f94960b68c7b4ac4314.zip |
(perform_parallel_install) previous commit nicely showed that error
management was nuts so do display errors
Diffstat (limited to 'Rpmdrake')
-rwxr-xr-x | Rpmdrake/pkg.pm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 81327706..906078ee 100755 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -426,11 +426,15 @@ Then, restart %s.", $rpmdrake::myname_update)), myexit(-1); sub perform_parallel_install { my ($urpm, $group, $w, $statusbar_msg_id) = @_; - my $pkgs = join(' ', map { if_($_->flag_requested, urpm_name($_)) } @{$urpm->{depslist}}); - my @error_msgs; - system("urpmi -v --X --parallel $group $pkgs"); - if ($? == 0) { - $statusbar_msg_id = statusbar_msg( + my @pkgs = map { if_($_->flag_requested, urpm_name($_)) } @{$urpm->{depslist}}; + my $temp = chomp_(`mktemp /tmp/rpmdrake.XXXXXXXX`); + -e $temp or die N("Could not create temporary directory '%s'", $temp); + + my $res = !run_program::get_stderr('urpmi', '2>', $temp, '-v', '--X', '--parallel', $group, @pkgs); + my @error_msgs = cat_($temp); + + if ($res) { + $$statusbar_msg_id = statusbar_msg( #N("Everything installed successfully"), N("All requested packages were installed successfully."), ); |