summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2002-08-02 12:41:47 +0000
committerDaouda Lo <daouda@mandriva.com>2002-08-02 12:41:47 +0000
commit6c223d83a794a4971313f8891d82dba7d00bb0e4 (patch)
tree1550ef5053974b4b9ec8492e26329942af2e9d68 /perl-install
parentbc55b1ffb67b127f359b5be4cf4b749289d280df (diff)
downloaddrakx-6c223d83a794a4971313f8891d82dba7d00bb0e4.tar
drakx-6c223d83a794a4971313f8891d82dba7d00bb0e4.tar.gz
drakx-6c223d83a794a4971313f8891d82dba7d00bb0e4.tar.bz2
drakx-6c223d83a794a4971313f8891d82dba7d00bb0e4.tar.xz
drakx-6c223d83a794a4971313f8891d82dba7d00bb0e4.zip
- avoiding looping indefinitalely when selecting items in combo
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/drakbug25
1 files changed, 15 insertions, 10 deletions
diff --git a/perl-install/standalone/drakbug b/perl-install/standalone/drakbug
index 4fff2c296..ff78b6954 100755
--- a/perl-install/standalone/drakbug
+++ b/perl-install/standalone/drakbug
@@ -117,6 +117,7 @@ gtkpack2__(
if (defined $prog) {
update_app($prog);
+ $comb_app->entry->set_text("$prog");
};
$comb_app->entry->signal_connect('changed', sub { update_app($comb_app->entry->get_text()) });
@@ -143,23 +144,27 @@ sub update_app {
if (member($text,@all_drakxtools) || $text eq _("Standalone Tools")) {
$app_choice = chomp_(`rpm -q drakxtools`) ;
} elsif (member($text,keys %{$mdk_app}) && $text ne _("Standalone Tools")) {
- $which_app = chomp_(`which '$mdk_app->{$text}'`);
- $app_choice = chomp_(`rpm -qf '$which_app' 2>1&`);
+ $app_choice = get_package($mdk_app->{$text});
} else {
- while (($key,$value) = each %{$mdk_app}) {
+ LOOP: while (($key,$value) = each %{$mdk_app}) {
next if $key eq _("Standalone Tools");
if ($value eq $text) {
- $which_app = chomp_(`which '$text'`);
- $app_choice = chomp_(`rpm -qf '$which_app' 2>1&`);
- $text = $key;
- print ("*********** key is : $key **** text is : $text\n");
-
- last;
+ $app_choice = get_package($text);
+ $prog = $key;
+ last LOOP;
}
}
+
}
$app_choice ne '' ? $package->set_text("$app_choice") : $package->set_text(_("Not installed"));
- $comb_app->entry->set_text("$text");
+}
+
+sub get_package {
+ my ($executable) = @_;
+ my ($rpm_package, $which_app);
+ $which_app = chomp_(`which '$executable'`);
+ $rpm_package = chomp_(`rpm -qf '$which_app' 2>1&`);
+ $rpm_package;
}
sub connect_bugzilla {