diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-01-17 13:39:31 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-01-17 13:39:31 +0000 |
commit | 020d6017de64a4a9410413410285fd3c777b0f23 (patch) | |
tree | e59d010b0e3ec128bd05b5f3881dea204cdc95dd | |
parent | 8912d4bf9864ed5b2cc2e6e1b1b841cda3adf4ea (diff) | |
download | rpmdrake-020d6017de64a4a9410413410285fd3c777b0f23.tar rpmdrake-020d6017de64a4a9410413410285fd3c777b0f23.tar.gz rpmdrake-020d6017de64a4a9410413410285fd3c777b0f23.tar.bz2 rpmdrake-020d6017de64a4a9410413410285fd3c777b0f23.tar.xz rpmdrake-020d6017de64a4a9410413410285fd3c777b0f23.zip |
Un-close a closure; remove a redundant sort(); remove unnecessary code
-rwxr-xr-x | rpmdrake | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -493,20 +493,21 @@ sub remove_arch { $_[0] =~ /(.*)\.[^\.]+$/ ? $1 : $_[0]; } +sub formatlistpkg { myformatList(sort { uc($a) cmp uc($b) } @_) } + sub run_treeview_dialog { my ($pkgs_provider, $callback_action) = @_; my ($urpm, $pkgs, $descriptions) = $pkgs_provider->(); my ($options, $size_selected, $compssUsers, $info, $info_update, $tree, $tree_model, %elems); - $size_selected = 0; #- to remove the use strict warning my (undef, $size_free) = MDK::Common::System::df('/usr'); - $::noBorder = 1; - $w = ugtk2->new(N("Rpmdrake %s", $rpmdrake::mdk_version || '')); - $::noBorder = 0; + { + local $::noBorder = 1; + $w = ugtk2->new(N("Rpmdrake %s", $rpmdrake::mdk_version || '')); + } - my $formatlistpkg = sub { myformatList(sort { uc($a) cmp uc($b) } @_) }; my $is_locale_available = sub { any { $urpm->{depslist}[$_]->flag_selected } keys %{$urpm->{provides}{$_[0]} || {}} and return 1; my $found; @@ -622,7 +623,7 @@ or you already installed all of them.")); @deps > 0 or return 1; deps_msg_again: my $results = interactive_msg_( - $title, $msg . $formatlistpkg->(@deps), + $title, $msg . formatlistpkg(@deps), yesno => [ N("Cancel"), N("More info"), N("Ok") ], scroll => 1, ); @@ -665,7 +666,7 @@ or you already installed all of them.")); } @impossible_to_remove and interactive_msg_(N("Some packages can't be removed"), N("Removing these packages would break your system, sorry:\n\n") . - $formatlistpkg->(sort { $a cmp $b } @impossible_to_remove)); + formatlistpkg(@impossible_to_remove)); @nodes_with_deps = difference2(\@nodes_with_deps, \@impossible_to_remove); } else { slow_func($tree->window, |