summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-09-03 06:26:47 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-09-03 06:26:47 +0000
commit3237592af5967731e85294ff611ad2c62d58a222 (patch)
tree1fc6fc086a670500e34cdb9e133d3d9d20629ca8
parent080c9d47e2f45a309149cb4636f7f57ac3eb4d39 (diff)
downloaddrakx-3237592af5967731e85294ff611ad2c62d58a222.tar
drakx-3237592af5967731e85294ff611ad2c62d58a222.tar.gz
drakx-3237592af5967731e85294ff611ad2c62d58a222.tar.bz2
drakx-3237592af5967731e85294ff611ad2c62d58a222.tar.xz
drakx-3237592af5967731e85294ff611ad2c62d58a222.zip
- we need unicode_start, which need kbd_mode and a real "echo" command
- initialize newt (and so slang) with a fake en_US.UTF-8 locale during install (and it works better when slang does its setlocale, i don't know why)
-rw-r--r--perl-install/Makefile3
-rw-r--r--perl-install/Newt/Newt.xs5
-rw-r--r--perl-install/interactive/newt.pm11
-rw-r--r--perl-install/share/list2
4 files changed, 18 insertions, 3 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 122fabfe1..e6cb9e2b6 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -149,6 +149,9 @@ endif
cd $(DEST)/usr/bin ; mv insmod insmod_
rmdir $(DEST)/bin $(DEST)/sbin
+ perl -pe 's!^echo!/usr/bin/echo!' /bin/unicode_start > $(DEST)/usr/bin/unicode_start
+ chmod a+x $(DEST)/usr/bin/unicode_start
+
perl -ane 'symlink "$$F[1]", "$(DEST)/usr/bin/$$F[0]"' share/aliases
ifeq (i386,$(ARCH))
diff --git a/perl-install/Newt/Newt.xs b/perl-install/Newt/Newt.xs
index fee23d388..caf961692 100644
--- a/perl-install/Newt/Newt.xs
+++ b/perl-install/Newt/Newt.xs
@@ -31,9 +31,10 @@ DESTROY()
}
int
-newtInit()
+newtInit(setlocale)
+ int setlocale
CODE:
- SLsmg_Setlocale = 0;
+ SLsmg_Setlocale = setlocale;
newtInit();
int
diff --git a/perl-install/interactive/newt.pm b/perl-install/interactive/newt.pm
index 5a1f22e5d..c9da9c92a 100644
--- a/perl-install/interactive/newt.pm
+++ b/perl-install/interactive/newt.pm
@@ -15,7 +15,16 @@ my ($width, $height) = (80, 25);
my @wait_messages;
sub new {
- Newt::Init();
+ if ($::isInstall) {
+ system('unicode_start'); #- don't use run_program, we must do it on current console
+ {
+ local $ENV{LC_CTYPE} = "en_US.UTF-8";
+ Newt::Init(1);
+ }
+ c::setlocale();
+ } else {
+ Newt::Init(0);
+ }
Newt::Cls();
Newt::SetSuspendCallback();
($width, $height) = Newt::GetScreenSize();
diff --git a/perl-install/share/list b/perl-install/share/list
index 73e593dce..9d90eae80 100644
--- a/perl-install/share/list
+++ b/perl-install/share/list
@@ -1,6 +1,7 @@
/bin/ash
/bin/consolechars
/bin/cpio
+/bin/echo
/bin/gzip
/LIB/libnss_nis.so.2
/LIB/libnss_files.so.2
@@ -26,6 +27,7 @@
/sbin/modinfo
/usr/bin/bzip2
/usr/bin/fb2png
+/usr/bin/kbd_mode
/usr/bin/packdrake
/usr/bin/parsehdlist
/usr/bin/perl