summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakbug
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-07-01 07:14:28 +0000
committerOlivier Blin <oblin@mandriva.org>2005-07-01 07:14:28 +0000
commit656c8863e26b97102d0b748dc90f2eba7dd7df47 (patch)
tree8d0fa1f151e7ea8cf65673d3933382aa3420d36d /perl-install/standalone/drakbug
parentaffd4648a7aae60e1dba2b951805675e73496ca8 (diff)
downloaddrakx-backup-do-not-use-656c8863e26b97102d0b748dc90f2eba7dd7df47.tar
drakx-backup-do-not-use-656c8863e26b97102d0b748dc90f2eba7dd7df47.tar.gz
drakx-backup-do-not-use-656c8863e26b97102d0b748dc90f2eba7dd7df47.tar.bz2
drakx-backup-do-not-use-656c8863e26b97102d0b748dc90f2eba7dd7df47.tar.xz
drakx-backup-do-not-use-656c8863e26b97102d0b748dc90f2eba7dd7df47.zip
simplify
Diffstat (limited to 'perl-install/standalone/drakbug')
-rwxr-xr-xperl-install/standalone/drakbug13
1 files changed, 4 insertions, 9 deletions
diff --git a/perl-install/standalone/drakbug b/perl-install/standalone/drakbug
index 1d48aa036..f93a32939 100755
--- a/perl-install/standalone/drakbug
+++ b/perl-install/standalone/drakbug
@@ -148,18 +148,13 @@ sub update_app {
$ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
if (member($text,@all_drakxtools) || $text eq N("Standalone Tools")) {
$app_choice = chomp_(`rpm -q drakxtools`);
- } elsif (exists($mdk_app->{$text}) && $text ne N("Standalone Tools")) {
+ } elsif (exists($mdk_app->{$text})) {
$app_choice = get_package($mdk_app->{$text});
} else {
- LOOP: while (my ($key, $value) = each %$mdk_app) {
- next if $key eq N("Standalone Tools");
- if ($value eq $text) {
- $app_choice = get_package($text);
- $prog = $key;
- last LOOP;
- }
+ if (my $tool = { reverse %$mdk_app }->{$text}) {
+ $app_choice = get_package($text);
+ $prog = $tool;
}
-
}
$app_choice ? $package->set_text($app_choice) : $package->set_text(N("Not installed"));
}