summaryrefslogtreecommitdiffstats
path: root/urpm/main_loop.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-06-26 12:53:05 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-06-26 12:53:05 +0000
commit9b057646f7da47ceccfb46ef6b357972f60c4b1e (patch)
treea92038ac2f75a6e2f8fadd77fc68f668933c0143 /urpm/main_loop.pm
parentd9fd3c612ce2beee21b860a46753fd5a22c318f2 (diff)
downloadurpmi-9b057646f7da47ceccfb46ef6b357972f60c4b1e.tar
urpmi-9b057646f7da47ceccfb46ef6b357972f60c4b1e.tar.gz
urpmi-9b057646f7da47ceccfb46ef6b357972f60c4b1e.tar.bz2
urpmi-9b057646f7da47ceccfb46ef6b357972f60c4b1e.tar.xz
urpmi-9b057646f7da47ceccfb46ef6b357972f60c4b1e.zip
- urpmi
o display a message "Package foo is already installed" when asking "urpmi foo bar" and only installing bar (#41593) (requires perl-URPM 3.16)
Diffstat (limited to 'urpm/main_loop.pm')
-rw-r--r--urpm/main_loop.pm17
1 files changed, 3 insertions, 14 deletions
diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm
index 4d8b4382..6f743746 100644
--- a/urpm/main_loop.pm
+++ b/urpm/main_loop.pm
@@ -294,20 +294,9 @@ if ($nok) {
if ($auto_select) {
print N("Packages are up to date"), "\n";
} else {
- my @pkgs = map { $urpm->{depslist}[$_] } map { split /\|/ } keys %$requested;
- my ($installed, $error) = partition { $_->flag_installed } @pkgs;
- my @installed = map { scalar $_->fullname } @$installed;
- my @error = map { scalar $_->fullname } @$error;
- my @msg1 = @installed == 0 ? () :
- @installed == 1 ?
- N("Package %s is already installed", join(', ', @installed)) :
- N("Packages %s are already installed", join(', ', @installed));
- my @msg2 = @error == 0 ? () :
- @error == 1 ?
- N("Package %s can not be installed", join(', ', @error)) :
- N("Packages %s can not be installed", join(', ', @error));
- $callbacks->{already_installed_or_not_installable} and $callbacks->{already_installed_or_not_installable}->(\@msg1, \@msg2);
- print join("\n", @msg1, @msg2, '');
+ my $msg = urpm::select::translate_already_installed($state);
+ $callbacks->{already_installed_or_not_installable} and
+ $callbacks->{already_installed_or_not_installable}->([$msg], []);
}
}
$exit_code = 15 if our $expect_install;