106 |
priority_upgrade => $urpm->{options}{'priority-upgrade'}, |
priority_upgrade => $urpm->{options}{'priority-upgrade'}, |
107 |
); |
); |
108 |
my @ask_unselect = urpm::select::unselected_packages($urpm, $state); |
my @ask_unselect = urpm::select::unselected_packages($urpm, $state); |
109 |
|
|
110 |
|
# If there are some unselected packages, designate that we are going to return nonzero code. |
111 |
|
if (@ask_unselect) { |
112 |
|
my $unselect_msg = N("Some requested packages cannot be installed:\n%s", |
113 |
|
urpm::select::translate_why_unselected($urpm, $state, @ask_unselect)); |
114 |
|
$urpm::postponed_msg .= $unselect_msg . "\n"; |
115 |
|
$urpm::postponed_code = 17; |
116 |
|
} |
117 |
|
|
118 |
@ask_unselect |
@ask_unselect |
119 |
? ask_continue(N( |
? ask_continue(N( |
120 |
"Some requested packages cannot be installed:\n%s\nContinue installation anyway?", |
"Some requested packages cannot be installed:\n%s\nContinue installation anyway?", |
419 |
} |
} |
420 |
); |
); |
421 |
|
|
422 |
|
# Merge postponed exit code to the result of package installation. |
423 |
|
$exit_code ||= $urpm::postponed_code; |
424 |
|
|
425 |
#- restart gurpmi if needed, keep command line for that. |
#- restart gurpmi if needed, keep command line for that. |
426 |
if ($restart_itself && !$exit_code) { |
if ($restart_itself && !$exit_code) { |
427 |
print N("restarting urpmi"), "\n"; |
print N("restarting urpmi"), "\n"; |
432 |
grep { !/^--no-priority-upgrade$|--previous-priority-upgrade=/ } @ARGV); |
grep { !/^--no-priority-upgrade$|--previous-priority-upgrade=/ } @ARGV); |
433 |
exec $0, @ARGV; |
exec $0, @ARGV; |
434 |
} |
} |
435 |
|
|
436 |
|
# Show postponed message before exiting |
437 |
|
$urpm->{error}->($urpm::postponed_msg) if $urpm::postponed_code != 0; |
438 |
|
|
439 |
exit $exit_code; |
exit $exit_code; |
440 |
} |
} |
441 |
|
|