diff options
Diffstat (limited to 'urpm/main_loop.pm')
-rw-r--r-- | urpm/main_loop.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm index 4a81ece0..c497027c 100644 --- a/urpm/main_loop.pm +++ b/urpm/main_loop.pm @@ -306,10 +306,10 @@ if ($nok) { } elsif ($test && $exit_code == 0) { #- Warning : the following message is parsed in urpm::parallel_* print N("Installation is possible"), "\n"; - } elsif (intersection([ keys %{$state->{selected}} ], - [ keys %{$urpm->{provides}{'should-restart'}} ])) { + } elsif ($callbacks->{need_restart} && intersection([ keys %{$state->{selected}} ], + [ keys %{$urpm->{provides}{'should-restart'}} ])) { if (my $need_restart_formatted = urpm::sys::need_restart_formatted($urpm->{root})) { - $callbacks->{need_restart}($need_restart_formatted) if $callbacks->{need_restart}; + $callbacks->{need_restart}($need_restart_formatted); # need_restart() accesses rpm db, so we need to ensure things are clean: urpm::sys::may_clean_rpmdb_shared_regions($urpm, $options{test}); |