diff options
-rw-r--r-- | perl-install/install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/install/pkgs.pm | 4 | ||||
-rw-r--r-- | perl-install/install/steps.pm | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 29d5ffcb2..c520ed907 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,5 @@ +- prevent going further if some transactions failed (mga#7016) + Version 14.39 - 3 September 2012 - rely on stage1 for mounting /dev diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm index 620e26b99..0115cd016 100644 --- a/perl-install/install/pkgs.pm +++ b/perl-install/install/pkgs.pm @@ -774,7 +774,7 @@ sub install { #- place (install::steps_gtk.pm,...). $callback->($packages, user => undef, install => $nb, $total); - _install_raw($packages, $isUpgrade, $callback, $LOG, 0); + my $exit_code = _install_raw($packages, $isUpgrade, $callback, $LOG, 0); log::l("closing install.log file"); close $LOG; @@ -785,6 +785,8 @@ sub install { clean_rpmdb_shared_regions(); #- workaround librpm which is buggy when using librpm rooted and the just installed rooted library fs::loopback::save_boot($loop_boot); + + $exit_code; } sub _unselect_package { 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. } |