From 7e35fa33f9c8bdaded1a9f1bfdb086283d909bf3 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sat, 16 Feb 2002 18:59:09 +0000 Subject: - fix non X + testing + su - since "interactive" takes care of "format" for type "combo", remove "format" (so that interactive_newt which switch to type "list" don't apply "format" once again) --- perl-install/interactive.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index b0bab6637..6cf45ed24 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -77,12 +77,13 @@ sub vnew { return interactive_http->new; } require c; + if ($su) { + $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}"; + $su = '' if $::testing; + } if ($ENV{DISPLAY} && system('/usr/X11R6/bin/xtest') == 0) { - if ($su) { - $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}"; - if ($> && !$::testing) { - exec("kdesu", "-c", "$0 @ARGV") or die _("kdesu missing"); - } + if ($su && $>) { + exec("kdesu", "-c", "$0 @ARGV") or die _("kdesu missing"); } eval { require interactive_gtk }; if (!$@) { @@ -265,6 +266,7 @@ sub ask_from_normalize { ${$e->{val}} = $li->[0] if ($e->{type} ne 'combo' || $e->{not_edit}) && !member(${$e->{val}}, @$li); if ($e->{type} eq 'combo' && $e->{format}) { my @l = map { $e->{format}->($_) } @{$e->{list}}; + delete $e->{format}; each_index { ${$e->{val}} = $l[$::i] if $_ eq ${$e->{val}}; } @{$e->{list}}; -- cgit v1.2.1