summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-08-28 21:16:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-08-28 21:16:32 +0000
commitff872004f6d5f202a6a8cd418bad3b2458d2ed66 (patch)
tree984a3ea576f9090b2aad069550b65a6595c04d4c
parentc047aee8e84b723f6910defab8b0de8063502490 (diff)
downloaddrakx-backup-do-not-use-ff872004f6d5f202a6a8cd418bad3b2458d2ed66.tar
drakx-backup-do-not-use-ff872004f6d5f202a6a8cd418bad3b2458d2ed66.tar.gz
drakx-backup-do-not-use-ff872004f6d5f202a6a8cd418bad3b2458d2ed66.tar.bz2
drakx-backup-do-not-use-ff872004f6d5f202a6a8cd418bad3b2458d2ed66.tar.xz
drakx-backup-do-not-use-ff872004f6d5f202a6a8cd418bad3b2458d2ed66.zip
no_comment
-rw-r--r--perl-install/Makefile7
-rw-r--r--perl-install/Xconfigurator.pm4
-rw-r--r--perl-install/common.pm5
-rw-r--r--perl-install/install2.pm2
-rw-r--r--perl-install/install_any.pm5
-rw-r--r--perl-install/install_interactive.pm97
-rw-r--r--perl-install/install_steps.pm4
-rw-r--r--perl-install/install_steps_gtk.pm6
-rw-r--r--perl-install/install_steps_interactive.pm94
-rw-r--r--perl-install/install_steps_newt.pm10
-rw-r--r--perl-install/install_steps_stdio.pm9
-rw-r--r--perl-install/keyboard.pm22
-rw-r--r--perl-install/lang.pm9
-rw-r--r--perl-install/modules.pm25
-rw-r--r--perl-install/sbus_probing/main.pm2
-rw-r--r--perl-install/share/keymaps.tar.bz2bin10879 -> 10929 bytes
-rwxr-xr-xperl-install/share/keymaps_generate9
-rw-r--r--tools/Makefile2
18 files changed, 168 insertions, 144 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile
index c894166e2..31ea28182 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -16,7 +16,7 @@ tar-drakxtools: clean
$(MAKE) -C ../tools clean
cd .. ; rm -rf drakxtools ; cp -af perl-install drakxtools ; cp -af tools/ddcprobe tools/serial_probe drakxtools
cd ../drakxtools ; rm -rf install* pkgs.pm ftp.pm t.pm */CVS ; mv Makefile.drakxtools Makefile ; mv -f standalone/* .
- cd .. ; tar cfy drakxtools.tar.bz2 --exclude CVS $(patsubst %,drakxtools/%,Makefile Makefile.config share/MonitorsDB share/Cards+ share/CardsNames Newt c ddcprobe serial_probe share/po pci_probing sbus_probing resize_fat share/diskdrake.rc share/isdndb.net $(STANDALONEPMS) icons *.pm)
+ cd .. ; tar cfI drakxtools.tar.bz2 --exclude CVS $(patsubst %,drakxtools/%,Makefile Makefile.config share/MonitorsDB share/Cards+ share/CardsNames Newt c ddcprobe serial_probe share/po pci_probing sbus_probing resize_fat share/diskdrake.rc share/isdndb.net $(STANDALONEPMS) icons *.pm)
cd .. ; rm -rf drakxtools
$(DIRS):
@@ -68,6 +68,8 @@ get_needed_files: $(DIRS)
ldd $$i 2>/dev/null | grep "=>" | sed -e 's/.*=> //' -e 's/ .*//' | uniq | sort >> /tmp/list; \
done
+ perl -Mlang -I. -e 'print "$$_\n" foreach lang::console_font_files()' >> /tmp/list
+
install -d $(DEST)/etc
install -d $(DEST)/lib
install -d $(DEST)/bin
@@ -113,10 +115,9 @@ endif
perl -ane 'symlink "$$F[1]", "$(DEST)/usr/bin/$$F[0]"' share/aliases
- for i in fonts keyboards locales gconv; do tar xfy `../tools/specific_arch share/$$i.tar.bz2` -C $(DEST); done
+ for i in fonts keyboards locales gconv keymaps; do tar xfI `../tools/specific_arch share/$$i.tar.bz2` -C $(DEST); done
cd share ; cp -a modparm.lst $(DEST)/usr/share
- cd share ; cp -a keymaps $(DEST)/usr/share
cd share ; cp -a consolefonts $(DEST)/usr/share
cd share ; cp template.in/*.in $(DEST)/usr/share
cd share ; cp MonitorsDB Cards+ CardsNames $(DEST)/usr/X11R6/lib/X11
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index 9a4306c0a..7f9456216 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -216,10 +216,10 @@ Do You want to use XFree 3.3 instead of XFree 4.0?"), 1) and $card->{driver} = '
"Xsun$1" : "XF86_$card->{server}");
-x "$prefix$card->{prog}" or $install && do {
- $in->suspend;
+ $in->suspend if ref($in) =~ /newt/;
&$install($card->{server}, $card->{Utah_glx} ? 'Mesa' : ()) if !$card->{driver};
&$install('server') if $card->{driver}; #- add XFree86-libs-DRI here if using DRI (future split of XFree86 TODO)
- $in->resume;
+ $in->resume if ref($in) =~ /newt/;
};
-x "$prefix$card->{prog}" or die "server $card->{server} is not available (should be in $prefix$card->{prog})";
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 1be6d4f95..851cf6971 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -346,7 +346,10 @@ sub translate {
require lang;
foreach (split ':', $lang) {
lang::load_po($_) unless defined $po::I18N::{$_};
- return ${$po::I18N::{$_}}{$s} || $s if %{$po::I18N::{$_}};
+ if (%{$po::I18N::{$_}}) {
+ return if $s eq '_I18N_';
+ return ${$po::I18N::{$_}}{$s} || $s
+ }
}
$s;
}
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index d9869853e..77a92f034 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -544,6 +544,7 @@ sub main {
display => sub { $o->{display} = $v },
security => sub { $o->{security} = $v },
live => sub { $::live = 1 },
+ noauto => sub { $::noauto = 1 },
test => sub { $::testing = 1 },
patch => sub { $patch = 1 },
defcfg => sub { $cfg = $v },
@@ -555,6 +556,7 @@ sub main {
auto_install => sub { $::auto_install = $v },
simple_themes => sub { $o->{simple_themes} = 1 },
alawindows => sub { $o->{security} = 0; $o->{partitioning}{clearall} = 1; $o->{bootloader}{crushMbr} = 1 },
+ fdisk => sub { $o->{partitioning}{fdisk} = 1 },
g_auto_install => sub { $::testing = $::g_auto_install = 1; $o->{partitioning}{auto_allocate} = 1 },
nomouseprobe => sub { $o->{nomouseprobe} = $v },
}}{lc $n}; &$f if $f;
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 8485fc163..11d57f120 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -120,10 +120,10 @@ sub getFile {
require crypto;
log::l("crypto::getFile $f");
crypto::getFile($f);
- } elsif ($method eq "ftp") {
+ } elsif ($::o->{method} eq "ftp") {
require ftp;
ftp::getFile($rel);
- } elsif ($method eq "http") {
+ } elsif ($::o->{method} eq "http") {
require http;
http::getFile($rel);
} else {
@@ -623,6 +623,7 @@ sub suggest_mount_points {
my $d = $handle->{dir};
my ($mnt) = grep { -e "$d/$l{$_}" } keys %l;
$mnt ||= (stat("$d/.bashrc"))[4] ? '/root' : '/home/user' . ++$user if -e "$d/.bashrc";
+ $mnt ||= (grep { -d $_ && (stat($_))[4] >= 500 } glob_("$d")) && '/home';
next if $uniq && fsedit::mntpoint2part($mnt, \@parts);
$part->{mntpoint} = $mnt;
diff --git a/perl-install/install_interactive.pm b/perl-install/install_interactive.pm
index 83b6c0a16..f24dff365 100644
--- a/perl-install/install_interactive.pm
+++ b/perl-install/install_interactive.pm
@@ -12,6 +12,7 @@ use log;
use partition_table qw(:types);
use partition_table_raw;
use detect_devices;
+use install_steps;
use devices;
use modules;
@@ -153,24 +154,79 @@ When you are done, don't forget to save using `w'", partition_table_raw::descrip
}
$o->resume;
0;
- } ];
+ } ] if $o->{partitioning}{fdisk};
log::l("partitioning wizard log:\n", (map { ">>wizlog>>$_\n" } @wizlog));
%solutions;
}
+#--------------------------------------------------------------------------------
+sub wait_load_module {
+ my ($o, $type, $text, $module) = @_;
+ $o->wait_message('',
+ [ _("Installing driver for %s card %s", $type, $text),
+ $::beginner ? () : _("(module %s)", $module)
+ ]);
+}
+
+
+sub load_module {
+ my ($o, $type) = @_;
+ my @options;
+
+ my $m = $o->ask_from_listf('',
+ _("Which %s driver should I try?", $type),
+ \&modules::module2text,
+ [ modules::module_of_type($type) ]) or return;
+ my $l = modules::module2text($m);
+ require modparm;
+ my @names = modparm::get_options_name($m);
+
+ if ((@names != 0) && $o->ask_from_list_('',
+_("In some cases, the %s driver needs to have extra information to work
+properly, although it normally works fine without. Would you like to specify
+extra options for it or allow the driver to probe your machine for the
+information it needs? Occasionally, probing will hang a computer, but it should
+not cause any damage.", $l),
+ [ __("Autoprobe"), __("Specify options") ], "Autoprobe") ne "Autoprobe") {
+ ASK:
+ if (@names >= 0) {
+ my @l = $o->ask_from_entries('',
+_("You may now provide its options to module %s.", $l),
+ \@names) or return;
+ @options = modparm::get_options_result($m, @l);
+ } else {
+ @options = split ' ',
+ $o->ask_from_entry('',
+_("You may now provide its options to module %s.
+Options are in format ``name=value name2=value2 ...''.
+For instance, ``io=0x300 irq=7''", $l),
+ _("Module options:"),
+ );
+ }
+ }
+ eval {
+ my $w = wait_load_module($o, $type, $l, $m);
+ modules::load($m, $type, @options);
+ };
+ if ($@) {
+ $o->ask_yesorno('',
+_("Loading module %s failed.
+Do you want to try again with other parameters?", $l), 1) or return;
+ goto ASK;
+ }
+ $l;
+}
+
#------------------------------------------------------------------------------
sub load_thiskind {
my ($o, $type) = @_;
- my $w; #- needed to make the wait_message stay alive
- my $pcmcia = $o->{pcmcia}
- unless !$::beginner && modules::pcmcia_need_config($o->{pcmcia}) &&
- !$o->ask_yesorno('', _("Try to find PCMCIA cards?"), 1);
- $w = $o->wait_message(_("PCMCIA"), _("Configuring PCMCIA cards...")) if modules::pcmcia_need_config($pcmcia);
-
- modules::load_thiskind($type, $pcmcia, sub { $w = $o->wait_load_module($type, @_) });
+ my $pcmcia = $o->{pcmcia} if modules::pcmcia_need_config($o->{pcmcia}) && !$::noauto;
+ my $w; $w = $o->wait_message(_("PCMCIA"), _("Configuring PCMCIA cards...")) if $pcmcia;
+ modules::load_thiskind($type, $pcmcia, sub { $w = wait_load_module($o, $type, @_) });
}
+
#------------------------------------------------------------------------------
sub setup_thiskind {
my ($o, $type, $auto, $at_least_one) = @_;
@@ -178,10 +234,8 @@ sub setup_thiskind {
return if arch() eq "ppc";
my @l;
- my $allow_probe = !$::expert || $o->ask_yesorno('', _("Try to find %s devices?", "PCI" . (arch() =~ /sparc/ && "/SBUS")), 1);
-
- if ($allow_probe) {
- @l = $o->load_thiskind($type);
+ if (!$::noauto) {
+ @l = load_thiskind($o, $type);
if (my @err = grep { $_ } map { $_->{error} } @l) {
$o->ask_warn('', join("\n", @err));
}
@@ -200,12 +254,25 @@ sub setup_thiskind {
$r = $o->ask_from_list_('', $msg, $opt, "No") unless $at_least_one && @l == 0;
if ($r eq "No") { return @l }
if ($r eq "Yes") {
- push @l, $o->load_module($type) || next;
+ push @l, load_module($o, $type) || next;
} else {
- #-eval { commands::modprobe("isapnp") };
- $o->ask_warn('', [ detect_devices::stringlist() ]); #-, scalar cat_("/proc/isapnp") ]);
+ $o->ask_warn('', [ detect_devices::stringlist() ]);
}
}
}
+#------------------------------------------------------------------------------
+sub upNetwork {
+ my ($o, $pppAvoided) = @_;
+ my $w = $o->wait_message('', _("Bringing up the network"));
+ install_steps::upNetwork($o, $pppAvoided);
+}
+sub downNetwork {
+ my ($o, $pppOnly) = @_;
+ my $w = $o->wait_message('', _("Bringing down the network"));
+ install_steps::downNetwork($o, $pppOnly);
+}
+
+
+
1;
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 75a5b0dda..d74e33b94 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -91,8 +91,6 @@ sub selectLanguage {
lang::set($o->{lang});
$o->{langs} ||= [ $o->{lang} ];
- lang::load_console_font($o->{lang});
-
if ($o->{keyboard_unsafe} || !$o->{keyboard}) {
$o->{keyboard_unsafe} = 1;
$o->{keyboard} = keyboard::lang2keyboard($o->{lang});
@@ -610,7 +608,7 @@ sub installCrypto {
my ($o) = @_;
my $u = $o->{crypto} or return; $u->{mirror} && $u->{packages} or return;
- $o->upNetwork;
+ upNetwork($o);
require crypto;
my @crypto_packages = crypto::getPackages($o->{prefix}, $o->{packages}, $u->{mirror});
$o->pkg_install(@{$u->{packages}});
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index aa30394b3..b5ae9772c 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -129,7 +129,7 @@ sub new($$) {
sub enteringStep {
my ($o, $step) = @_;
- print _("Entering step `%s'\n", translate($o->{steps}{$step}{text}));
+ printf "Entering step `%s'\n", $o->{steps}{$step}{text};
$o->SUPER::enteringStep($step);
create_steps_window($o);
create_help_window($o);
@@ -362,7 +362,7 @@ sub choosePackagesTree {
pkgs::correctSize($size / sqr(1024)),
install_any::getAvailableSpace($o) / sqr(1024)));
};
- my $toggle = sub {
+ my $toggle_ = sub {
if (ref $curr) {
$tree->toggle_expansion($curr);
} else {
@@ -406,6 +406,8 @@ sub choosePackagesTree {
}
}
};
+ my $toggle = sub { &$toggle_; gtkset_mousecursor_normal() };
+
$tree->signal_connect(button_press_event => sub { &$toggle if $_[1]{type} =~ /^2/ });
$tree->signal_connect(key_press_event => sub {
my ($w, $e) = @_;
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 010abf961..3bcfff1ce 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -61,6 +61,8 @@ sub selectLanguage($) {
$o->{lang});
install_steps::selectLanguage($o);
+ $o->ask_warn('', "No translation is available yet during installation in this language") if $o->{lang} !~ /^en/ && translate("_I18N_");
+
#- $o->{useless_thing_accepted} = $o->ask_from_list_('',
#-"Warning no warranty",
#- [ __("Accept"), __("Refuse") ], "Accept") eq "Accept" or _exit(1) unless $o->{useless_thing_accepted};
@@ -646,7 +648,7 @@ USA")) || return;
return if $@;
#- bring all interface up for installing crypto packages.
- $o->upNetwork();
+ install_interactive::upNetwork($o);
my @packages = do {
my $w = $o->wait_message('', _("Contacting the mirror to get the list of available packages"));
@@ -658,7 +660,7 @@ USA")) || return;
$o->pkg_install(@{$u->{packages} = [ grep { $h{$_} } @packages ]});
#- stop interface using ppp only.
- $o->downNetwork('pppOnly');
+ install_interactive::downNetwork($o, 'pppOnly');
}
#------------------------------------------------------------------------------
@@ -694,11 +696,11 @@ sub configurePrinter {
#- bring interface up for installing ethernet packages but avoid ppp by default,
#- else the guy know what he is doing...
- #$o->upNetwork('pppAvoided');
+ #install_interactive::upNetwork($o, 'pppAvoided');
eval { add2hash($o->{printer} ||= {}, printer::getinfo($o->{prefix})) };
$o->{printer}{PAPERSIZE} = $o->{lang} eq 'en' ? 'letter' : 'a4';
- printerdrake::main($o->{printer}, $o, sub { $o->pkg_install($_[0]) }, sub { $o->upNetwork('pppAvoided') });
+ printerdrake::main($o->{printer}, $o, sub { $o->pkg_install($_[0]) }, sub { install_interactive::upNetwork($o, 'pppAvoided') });
}
#------------------------------------------------------------------------------
@@ -991,8 +993,6 @@ Do you want to keep XFree 3.3?"), 0) if $::expert;
{ local $::testing = 0; #- unset testing
local $::auto = $::beginner;
- local $::noauto = $::expert && !$o->ask_yesorno('', _("Try to find PCI devices?"), 1);
- $::noauto = $::noauto; #- no warning
Xconfigurator::main($o->{prefix}, $o->{X}, $o, $o->{allowFB}, bool($o->{pcmcia}), sub {
my ($server, @l) = @_;
@@ -1104,88 +1104,6 @@ install chapter of the Official Linux-Mandrake User's Guide.")) if $alldone && !
#- Misc Steps Functions
#-######################################################################################
-#--------------------------------------------------------------------------------
-sub wait_load_module {
- my ($o, $type, $text, $module) = @_;
- $o->wait_message('',
- [ _("Installing driver for %s card %s", $type, $text),
- $::beginner ? () : _("(module %s)", $module)
- ]);
-}
-
-
-sub load_module {
- my ($o, $type) = @_;
- my @options;
-
- my $m = $o->ask_from_list('',
- _("Which %s driver should I try?", $type),
- \&modules::module2text,
- [ modules::module_of_type($type) ]) or return;
- my $l = modules::module2text($m);
- require modparm;
- my @names = modparm::get_options_name($m);
-
- if ((@names != 0) && $o->ask_from_list_('',
-_("In some cases, the %s driver needs to have extra information to work
-properly, although it normally works fine without. Would you like to specify
-extra options for it or allow the driver to probe your machine for the
-information it needs? Occasionally, probing will hang a computer, but it should
-not cause any damage.", $l),
- [ __("Autoprobe"), __("Specify options") ], "Autoprobe") ne "Autoprobe") {
- ASK:
- if (@names >= 0) {
- my @l = $o->ask_from_entries('',
-_("You may now provide its options to module %s.", $l),
- \@names) or return;
- @options = modparm::get_options_result($m, @l);
- } else {
- @options = split ' ',
- $o->ask_from_entry('',
-_("You may now provide its options to module %s.
-Options are in format ``name=value name2=value2 ...''.
-For instance, ``io=0x300 irq=7''", $l),
- _("Module options:"),
- );
- }
- }
- eval {
- my $w = wait_load_module($o, $type, $l, $m);
- modules::load($m, $type, @options);
- };
- if ($@) {
- $o->ask_yesorno('',
-_("Loading module %s failed.
-Do you want to try again with other parameters?", $l), 1) or return;
- goto ASK;
- }
- $l;
-}
-
-#------------------------------------------------------------------------------
-sub load_thiskind {
- my ($o, $type) = @_;
- my $w; #- needed to make the wait_message stay alive
- my $pcmcia = $o->{pcmcia}
- unless !$::beginner && modules::pcmcia_need_config($o->{pcmcia}) &&
- !$o->ask_yesorno('', _("Try to find PCMCIA cards?"), 1);
- $w = $o->wait_message(_("PCMCIA"), _("Configuring PCMCIA cards...")) if modules::pcmcia_need_config($pcmcia);
-
- modules::load_thiskind($type, $pcmcia, sub { $w = wait_load_module($o, $type, @_) });
-}
-
-sub upNetwork {
- my ($o, $pppAvoided) = @_;
- my $w = $o->wait_message('', _("Bringing up the network"));
- install_steps::upNetwork($o, $pppAvoided);
-}
-sub downNetwork {
- my ($o, $pppOnly) = @_;
- my $w = $o->wait_message('', _("Bringing down the network"));
- install_steps::downNetwork($o, $pppOnly);
-}
-
-
#-######################################################################################
#- Wonderful perl :(
#-######################################################################################
diff --git a/perl-install/install_steps_newt.pm b/perl-install/install_steps_newt.pm
index 62db5486b..ffff494f3 100644
--- a/perl-install/install_steps_newt.pm
+++ b/perl-install/install_steps_newt.pm
@@ -13,6 +13,7 @@ use install_steps_interactive;
use interactive_newt;
use install_any;
use devices;
+use lang;
use common qw(:common);
my $banner = __();
@@ -45,6 +46,15 @@ sub exitInstall {
interactive_newt::end;
}
+#-######################################################################################
+#- Steps Functions
+#-######################################################################################
+sub selectLanguage {
+ my ($o) = @_;
+ $o->SUPER::selectLanguage;
+ lang::load_console_font($o->{lang});
+}
+
1;
diff --git a/perl-install/install_steps_stdio.pm b/perl-install/install_steps_stdio.pm
index 734c4f451..86d10cb48 100644
--- a/perl-install/install_steps_stdio.pm
+++ b/perl-install/install_steps_stdio.pm
@@ -32,4 +32,13 @@ sub leavingStep {
print "--------\n";
}
+#-######################################################################################
+#- Steps Functions
+#-######################################################################################
+sub selectLanguage {
+ my ($o, $first_time) = @_;
+ $o->SUPER::selectLanguage($first_time);
+ lang::load_console_font($o->{lang});
+}
+
1;
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index f5c4dc5a7..dc6ab0b4b 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -207,13 +207,13 @@ sub loadkeys_files {
@l, keys %l, grep { -e $_ } map { "$p/$_.inc.gz" } qw(compose euro windowkeys linux-keys-bare);
}
-sub lang2keyboard($) {
- local ($_) = @_;
- my $kb = $lang2keyboard{$_} || $keyboards{$_} && $_ || "us";
+sub lang2keyboard {
+ my ($l) = @_;
+ my $kb = $lang2keyboard{$l} || $keyboards{$l} && $l || "us";
$keyboards{$kb} ? $kb : "us"; #- handle incorrect keyboad mapping to us.
}
-sub load($) {
+sub load {
my ($keymap) = @_;
return if $::testing;
@@ -253,25 +253,25 @@ sub xmodmap_file {
-e $f && $f;
}
-sub setup($) {
+sub setup {
return if arch() =~ /^sparc/;
my ($keyboard) = @_;
my $o = $keyboards{$keyboard} or return;
log::l("loading keymap $o->[1]");
- if (-e (my $f = "$ENV{SHARE_PATH}/keymaps/$o->[1].kmap")) {
- load(cat_($f));
+ if (-e (my $f = "$ENV{SHARE_PATH}/keymaps/$o->[1].bkmap")) {
+ load(scalar cat_($f));
} else {
local *F;
- open F, "packdrake -x $ENV{SHARE_PATH}/keymaps.cz2 '' $o->[1].kmap |";
+ open F, "packdrake -x $ENV{SHARE_PATH}/keymaps.cz2 '' $o->[1].bkmap |";
local $/ = undef;
- eval { load(<F>) };
+ eval { load(scalar <F>) };
}
my $f = xmodmap_file($keyboard);
eval { run_program::run('xmodmap', $f) } unless $::testing || !$f;
}
-sub write($$$;$) {
+sub write {
my ($prefix, $keyboard, $charset, $isNotDelete) = @_;
setVarsInSh("$prefix/etc/sysconfig/keyboard", { KEYTABLE => keyboard2kmap($keyboard),
@@ -280,7 +280,7 @@ sub write($$$;$) {
run_program::rooted($prefix, "dumpkeys > /etc/sysconfig/console/default.kmap") or log::l("dumpkeys failed");
}
-sub read($) {
+sub read {
my ($prefix) = @_;
my %keyf = getVarsFromSh("$prefix/etc/sysconfig/keyboard");
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index f5777151d..dfb0bf742 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -353,12 +353,19 @@ sub load_po($) {
}
+sub console_font_files {
+ map { -e $_ ? $_ : "$_.gz" }
+ (map { "/usr/lib/kbd/consolefonts/$_.psf" } uniq grep {$_} map { $_->[0] } values %charsets),
+ (map { -e $_ ? $_ : "$_.sfm" } map { "/usr/lib/kbd/consoletrans/$_" } uniq grep {$_} map { $_->[1] } values %charsets),
+ (map { -e $_ ? $_ : "$_.acm" } map { "/usr/lib/kbd/consoletrans/$_" } uniq grep {$_} map { $_->[2] } values %charsets),
+}
+
sub load_console_font {
my ($lang) = @_;
my ($charset) = $languages{$lang} && $languages{$lang}[1] ;
my ($f, $u, $m) = @{$charsets{$charset} || []};
- run_program::run('consolechars',
+ run_program::run('consolechars', '-v',
('-f', $f || 'lat0-sun16'),
$u ? ('-u', $u) : (),
$m ? ('-m', $m) : ());
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index c2075f453..1b14a02fb 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -344,7 +344,7 @@ sub get_options {
$conf{$name}{options};
}
-sub add_alias($$) {
+sub add_alias {
my ($alias, $name) = @_;
$name =~ /ignore/ and return;
/\Q$alias/ && $conf{$_}{alias} && $conf{$_}{alias} eq $name and return $_ foreach keys %conf;
@@ -354,6 +354,9 @@ sub add_alias($$) {
if ($name =~ /^snd-card-/) {
$conf{$name}{"post-install"} = "modprobe snd-pcm-oss";
}
+ if ($alias eq 'scsi_hostadapter') {
+ add_alias('block-major-11', $alias);
+ }
$alias;
}
@@ -383,6 +386,7 @@ sub load {
if ($name eq "usb-storage") {
sleep(2);
-d "/proc/scsi/usb" or return;
+ $conf{"usb-storage"}{"post-install"} = "modprobe usbkbd; modprobe keybdev";
}
if ($type) {
add_alias('scsi_hostadapter', $name), load('sd_mod') if $type =~ /scsi/ || $type eq $type_aliases{scsi};
@@ -428,6 +432,8 @@ sub load_raw {
}
} @l;
+ die "insmod'ing module " . join(", ", map { $_->[0] } @failed) . " failed" if @failed;
+
foreach (@l) {
if ($_->[0] eq "parport_pc") {
#- this is a hack to make plip go
@@ -440,7 +446,6 @@ sub load_raw {
load_multi("usbkbd", "keybdev");
}
}
- die "insmod'ing module " . join(", ", map { $_->[0] } @failed) . " failed" if @failed;
}
sub read_already_loaded() {
@@ -474,7 +479,6 @@ sub read_conf($;$) {
}
#- cheating here: not handling aliases of aliases
while (my ($k, $v) = each %c) {
-#- $$scsi ||= $v->{scsi_hostadapter} if $scsi;
if (my $a = $v->{alias}) {
local $c{$a}{alias};
add2hash($c{$a}, $v);
@@ -489,7 +493,7 @@ sub write_conf {
my $file = "$prefix/etc/modules.conf";
rename "$prefix/etc/conf.modules", $file; #- make the switch to new name if needed
- #- remove the post-install supermount stuff. We may have to add some more
+ #- remove the post-install supermount stuff. We now do it in /etc/modules
substInFile { $_ = '' if /^post-install supermount/ } $file;
my $written = read_conf($file);
@@ -497,12 +501,6 @@ sub write_conf {
my %net = detect_devices::net2module();
while (my ($k, $v) = each %net) { add_alias($k, $v) }
- my @l = sort grep { $conf{$_}{alias} && /scsi_hostadapter/ } keys %conf;
- add_alias('block-major-11', 'scsi_hostadapter') if @l;
- push @l, "ide-floppy" if detect_devices::ide_zips();
- $conf{supermount}{"post-install"} = join " ; ", map { "modprobe $_" } @l if @l;
- $conf{"usb-storage"}{"post-install"} = "modprobe usbkbd; modprobe keybdev" if @l && arch() !~ /sparc|alpha/;
-
local *F;
open F, ">> $file" or die("cannot write module config file $file: $!\n");
while (my ($mod, $h) = each %conf) {
@@ -510,6 +508,13 @@ sub write_conf {
print F "$type $mod $v2\n" if $v2 && $type ne "loaded" && !$written->{$mod}{$type};
}
}
+ my @l = map { "scsi_hostadapter$_\n" } '', 1..$scsi-1 if $scsi;
+ push @l, "ide-floppy" if detect_devices::ide_zips();
+
+ substInFile {
+ $_ = '' if /^scsi_hostadapter/;
+ $_ = join '', @l if eof;
+ } "$prefix/etc/modules";
}
sub read_stage1_conf {
diff --git a/perl-install/sbus_probing/main.pm b/perl-install/sbus_probing/main.pm
index f226eeea8..9282d8d90 100644
--- a/perl-install/sbus_probing/main.pm
+++ b/perl-install/sbus_probing/main.pm
@@ -127,7 +127,7 @@ sub prom_walk($$$$) {
}
sub probe {
- eval { modules::load("openprom") };
+ eval { modules::load("openprom") } if arch() =~ /sparc/;
my $root_node = c::prom_open();
my @l;
diff --git a/perl-install/share/keymaps.tar.bz2 b/perl-install/share/keymaps.tar.bz2
index c5d5177cc..8ca03c137 100644
--- a/perl-install/share/keymaps.tar.bz2
+++ b/perl-install/share/keymaps.tar.bz2
Binary files differ
diff --git a/perl-install/share/keymaps_generate b/perl-install/share/keymaps_generate
index 29fd576fb..a2c461fb6 100755
--- a/perl-install/share/keymaps_generate
+++ b/perl-install/share/keymaps_generate
@@ -3,15 +3,16 @@
use lib "..";
use keyboard;
-system("rm -rf keymaps ; mkdir keymaps");
+my $dir = "keymaps/usr/share/keymaps";
+system("rm -rf keymaps ; mkdir -p keymaps/usr/share/keymaps");
foreach (keyboard::xmodmaps()) {
my $kmap = keyboard::keyboard2kmap($_);
- if (system("./kmap2bkmap $kmap > keymaps/$kmap.bkmap 2>/dev/null") != 0) {
+ if (system("./kmap2bkmap $kmap > $dir/$kmap.bkmap 2>/dev/null") != 0) {
warn "unknown kmap $kmap\n";
- unlink "keymaps/$kmap.bkmap";
+ unlink "$dir/$kmap.bkmap";
}
}
-system("tar cfI keymaps.tar.bz2 keymaps") == 0 or die;
+system("tar cfI keymaps.tar.bz2 -C keymaps usr") == 0 or die;
system("rm -rf keymaps");
diff --git a/tools/Makefile b/tools/Makefile
index 0854d15ae..147c0ad2a 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -31,7 +31,7 @@ $(BASE)/depslist: $(BASE)/hdlists $(BASE)/hdlist.cz
gendepslist2 -o $@ `cat $< | perl -pe 's|^(\S*).*|'$(BASE)'/$$1|' `
$(BASE)/filelist: $(RPMS)
- genfilelist $(ROOTDEST)/Mandrake/RPMS* >$@
+# genfilelist $(ROOTDEST)/Mandrake/RPMS* >$@
$(BASE)/hdlist.cz: $(BASE)/hdlists $(RPMS)
genhdlists --noclean --distrib $(ROOTDEST)