diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-05-28 14:38:32 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-05-28 14:38:32 +0000 |
commit | 1b2b63e8a2ba16d3ced81126dc0539942629ba94 (patch) | |
tree | 02b371c863de8dc31213ece437d0e9b30614c5f2 | |
parent | e27454431efca8401ceca5935f03a89ef5d68b77 (diff) | |
download | rpmdrake-1b2b63e8a2ba16d3ced81126dc0539942629ba94.tar rpmdrake-1b2b63e8a2ba16d3ced81126dc0539942629ba94.tar.gz rpmdrake-1b2b63e8a2ba16d3ced81126dc0539942629ba94.tar.bz2 rpmdrake-1b2b63e8a2ba16d3ced81126dc0539942629ba94.tar.xz rpmdrake-1b2b63e8a2ba16d3ced81126dc0539942629ba94.zip |
print a message when an action has been launched but no packages are selected
-rwxr-xr-x | rpmdrake | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -703,7 +703,10 @@ or you already installed all of them.")); my $find_callback = sub { do_search($find_entry, $tree, $tree_model, $options, $current_search_type, $urpm, $pkgs) }; my $do_action = sub { - int(grep { $pkgs->{$_}{selected} } keys %$pkgs) or return; + if (!int(grep { $pkgs->{$_}{selected} } keys %$pkgs)) { + interactive_msg_(N("You need to select some packages first."), N("You need to select some packages first.")); + return; + } my $size_added = sum(map { if_($_->flag_selected && !$_->flag_installed, $_->size) } @{$urpm->{depslist}}); if ($MODE eq 'install' && $size_free - $size_added/1024 < 50*1024) { interactive_msg_(N("Too many packages are selected"), |