diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-11-10 17:18:24 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-11-10 17:18:24 +0000 |
commit | 449a64e3545584a72536865ae007ae6bb03fc657 (patch) | |
tree | afab3d5ca7476d0cb1fb6334808deb426a32d0da | |
parent | 61a0e07fd9b9ef0d3658c9343d5b475ec0aed0ed (diff) | |
download | urpmi-449a64e3545584a72536865ae007ae6bb03fc657.tar urpmi-449a64e3545584a72536865ae007ae6bb03fc657.tar.gz urpmi-449a64e3545584a72536865ae007ae6bb03fc657.tar.bz2 urpmi-449a64e3545584a72536865ae007ae6bb03fc657.tar.xz urpmi-449a64e3545584a72536865ae007ae6bb03fc657.zip |
If some packages have been deselected during dependency resolution, because
they depended on some for which newer ones were installed, but if those
first packages weren't actually installed, warn the user about them.
(bug #12306)
-rwxr-xr-x | urpmi | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -439,6 +439,30 @@ my $restart_itself = $urpm->resolve_dependencies( priority_upgrade => $test || $env ? '' : $urpm->{options}{'priority-upgrade'}, ); +my @unselected_uninstalled = @{$state->{unselected_uninstalled} || []}; +if (@unselected_uninstalled) { + my $list = join "\n", map { $_->name . '-' . $_->version . '-' . $_->release } @unselected_uninstalled; + my $msg = N("The following packages can't be installed because they depend on packages +that are older than the installed ones:\n%s", $list); + if ($urpm->{options}{auto}) { + message($msg, 'noX'); + } else { + if ($urpm::args::options{X}) { + gmessage("$msg\n" . N("do you agree ?")); + $? and exit 0; + } else { + my $noexpr = N("Nn"); + my $yesexpr = N("Yy"); + message_input( + $msg . N("\nContinue?") . N(" (Y/n) "), + $force && $yesexpr, + boolean => 1, + ) =~ /[$noexpr]/ + and exit 0; + } + } +} + my @ask_unselect = $urpm->unselected_packages($state); if (@ask_unselect) { my $list = join "\n", $urpm->translate_why_unselected($state, sort @ask_unselect); |