summaryrefslogtreecommitdiffstats
path: root/perl-install/install/steps.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-09-03 17:29:30 +0000
committerThierry Vignaud <tv@mageia.org>2012-09-03 17:29:30 +0000
commita42538f666f524e51abdcf31f33deac8d78a3877 (patch)
tree3cb900f67b1d2c58d92ccc3f2d61cf806421db46 /perl-install/install/steps.pm
parent66dc3d5c248149a73f17015be709fb8f5ac77853 (diff)
downloaddrakx-a42538f666f524e51abdcf31f33deac8d78a3877.tar
drakx-a42538f666f524e51abdcf31f33deac8d78a3877.tar.gz
drakx-a42538f666f524e51abdcf31f33deac8d78a3877.tar.bz2
drakx-a42538f666f524e51abdcf31f33deac8d78a3877.tar.xz
drakx-a42538f666f524e51abdcf31f33deac8d78a3877.zip
(installPackages) prevent going further if some transactions failed (mga#7016)
(_install_raw,install) propagate exit code
Diffstat (limited to 'perl-install/install/steps.pm')
-rw-r--r--perl-install/install/steps.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/install/steps.pm b/perl-install/install/steps.pm
index d595888c9..748db7280 100644
--- a/perl-install/install/steps.pm
+++ b/perl-install/install/steps.pm
@@ -427,6 +427,7 @@ sub installPackages {
#- small transaction will be built based on this selection and depslist.
my @toInstall = install::pkgs::packagesToInstall($packages);
+ my $exit_code;
my $time = time();
{
local $ENV{DURING_INSTALL} = 1;
@@ -434,13 +435,14 @@ sub installPackages {
local $ENV{TMP} = '/tmp';
local $ENV{HOME};
local $packages->{options}{auto} = !$o_interactive;
- install::pkgs::install($o->{isUpgrade}, \@toInstall, $packages, \&installCallback);
+ $exit_code = install::pkgs::install($o->{isUpgrade}, \@toInstall, $packages, \&installCallback);
}
any::writeandclean_ldsoconf($::prefix);
log::l("Install took: ", formatTimeRaw(time() - $time));
run_program::rooted_or_die($::prefix, 'ldconfig') if !$o->{justdb};
+ $exit_code and die "Installation failed";
install::media::log_sizes();
scalar(@toInstall); #- return number of packages installed.
}