diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-02-09 11:38:02 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-02-09 11:38:02 +0000 |
commit | 4ce69234e573c58002f3d1a9f361489410e883b2 (patch) | |
tree | e9f590e2fd57d708f76c3249a442864a2b50a365 /perl-install | |
parent | 06f02f9536b2a9fb1283dd33c441b5e66da23551 (diff) | |
download | drakx-backup-do-not-use-4ce69234e573c58002f3d1a9f361489410e883b2.tar drakx-backup-do-not-use-4ce69234e573c58002f3d1a9f361489410e883b2.tar.gz drakx-backup-do-not-use-4ce69234e573c58002f3d1a9f361489410e883b2.tar.bz2 drakx-backup-do-not-use-4ce69234e573c58002f3d1a9f361489410e883b2.tar.xz drakx-backup-do-not-use-4ce69234e573c58002f3d1a9f361489410e883b2.zip |
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/Newt/Av_CharPtrPtr.c | 2 | ||||
-rw-r--r-- | perl-install/Xconfigurator.pm | 26 | ||||
-rwxr-xr-x | perl-install/do_resize_fat | 4 | ||||
-rw-r--r-- | perl-install/install2.pm | 7 | ||||
-rw-r--r-- | perl-install/install_any.pm | 4 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 6 | ||||
-rw-r--r-- | perl-install/install_steps_gtk.pm | 4 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 8 | ||||
-rw-r--r-- | perl-install/lang.pm | 12 | ||||
-rw-r--r-- | perl-install/modules.pm | 3 | ||||
-rw-r--r-- | perl-install/my_gtk.pm | 4 | ||||
-rw-r--r-- | perl-install/pkgs.pm | 24 | ||||
-rw-r--r-- | perl-install/resize_fat/io.pm | 18 | ||||
-rw-r--r-- | perl-install/share/compssList | 16 | ||||
-rw-r--r-- | perl-install/share/list | 2 |
15 files changed, 80 insertions, 60 deletions
diff --git a/perl-install/Newt/Av_CharPtrPtr.c b/perl-install/Newt/Av_CharPtrPtr.c index d108ef5d0..f28fa6315 100644 --- a/perl-install/Newt/Av_CharPtrPtr.c +++ b/perl-install/Newt/Av_CharPtrPtr.c @@ -52,7 +52,7 @@ SV *rv; if( s[x] == NULL ) warn("XS_unpack_charPtrPtr: unable to malloc char*"); else - strcpy( s[x], SvPV( *ssv, na ) ); + strcpy( s[x], SvPV( *ssv, PL_na ) ); } else warn("XS_unpack_charPtrPtr: array elem %d was not a string.", x ); diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index c8d94f082..fd73f0a3f 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -327,20 +327,20 @@ sub testFinalConfig($;$$) { my $b = before_leaving { unlink $f_err }; - local $_; - local *F; open F, $f_err; - i: while (<F>) { - if (/\b(error|not supported)\b/i) { - my @msg = !/error/ && $_ ; - while (<F>) { - /not fatal/ and last i; - /^$/ and last; - push @msg, $_; + unless (c::Xtest(":9")) { + local $_; + local *F; open F, $f_err; + i: while (<F>) { + if (/\b(error|not supported)\b/i) { + my @msg = !/error/ && $_ ; + while (<F>) { + /not fatal/ and last i; + /^$/ and last; + push @msg, $_; + } + $in->ask_warn('', [ _("An error occurred:"), " ", @msg, _("\ntry changing some parameters") ]); + return 0; } - $in->ask_warn('', [ _("An error occurred:"), " ", - @msg, - _("\ntry changing some parameters") ]); - return 0; } } diff --git a/perl-install/do_resize_fat b/perl-install/do_resize_fat index 239446841..41ebf1b83 100755 --- a/perl-install/do_resize_fat +++ b/perl-install/do_resize_fat @@ -3,13 +3,13 @@ use diagnostics; use strict; -use lib qw(.); +use lib qw(/usr/lib/libDrakX); use common; use resize_fat::main; local *log::l = sub { print join(' ', @_), "\n" }; -@ARGV = qw(/tmp/dd +0); +@ARGV = qw(/mnt/iso/w +0); @ARGV == 2 or die "usage: fatresize <device> <size>\n <size> = 100 means `resize to 100Mb'\n <size> = +10 means `keep 10Mb of free space'\n"; diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 2bcd3ba97..9ad6af9b6 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -252,6 +252,7 @@ sub selectKeyboard { #- if we go back to the selectKeyboard, you must rewrite addToBeDone { + lang::write($o->{prefix}); keyboard::write($o->{prefix}, $o->{keyboard}); } 'doInstallStep' unless $::g_auto_install; } @@ -287,7 +288,7 @@ sub setupSCSI { sub partitionDisks { return $o->{fstab} = [ - { device => "loop7", type => 0x83, size => ((cat_('/dos/lnx4win/size.txt'))[0]*2048), mntpoint => "/", isFormatted => 1, isMounted => 1 }, + { device => "loop7", type => 0x83, size => 2048 * cat_('/dos/lnx4win/size.txt'), mntpoint => "/", isFormatted => 1, isMounted => 1 }, { device => "/initrd/dos/lnx4win/swapfile", type => 0x82, mntpoint => "swap", isFormatted => 1, isMounted => 1 }, ] if $o->{lnx4win}; return if $o->{isUpgrade}; @@ -361,7 +362,6 @@ sub choosePackages { if ($_[1] == 1) { $o->{compssUsersChoice}{$_} = 1 foreach @{$o->{compssUsersSorted}}, 'Miscellaneous'; $o->{compssUsersChoice}{KDE} = 0 if $o->{lang} =~ /ja|el|ko|th|vi|zh/; #- gnome handles much this fonts much better - } $o->choosePackages($o->{packages}, $o->{compss}, $o->{compssUsers}, $o->{compssUsersSorted}, $_[1] == 1); @@ -617,8 +617,7 @@ sub main { modules::read_stage1_conf("/tmp/conf.modules"); modules::read_already_loaded(); - eval { modules::load("ide-disk") }; - eval { modules::load("sd_mod") }; + eval { modules::load($_) } foreach qw(ide-probe ide-disk sd_mod af_packet); install_any::lnx4win_preinstall() if $o->{lnx4win}; #-the main cycle diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index e690c7e32..1d4c324a2 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -445,7 +445,7 @@ sub g_auto_install(;$) { } } -#- local $o->{partitioning}{clearall} = 1; + local $o->{partitioning}{auto_allocate} = 1; $_ = { %{$_ || {}} }, delete @$_{qw(oldu oldg password password2)} foreach $o->{superuser}, @{$o->{users} || []}; @@ -479,8 +479,8 @@ sub loadO { local $/ = "\0"; no strict; eval <F>; + $@ and log::l("Bad kickstart file $f (failed $@)"); } - $@ and log::l _("Bad kickstart file %s (failed %s)", $f, $@); add2hash_($o ||= {}, $O); } bless $o, ref $O; diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 84c4918c5..777b24205 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -84,7 +84,7 @@ sub set_help { 1 } #------------------------------------------------------------------------------ sub selectLanguage { my ($o) = @_; - lang::set($o->{lang}); + lang::set($o->{lang}, $o->{langs}); if ($o->{keyboard_unsafe} || !$o->{keyboard}) { $o->{keyboard_unsafe} = 1; @@ -261,6 +261,10 @@ sub afterInstallPackages($) { #- remove the nasty acon... run_program::rooted($o->{prefix}, "chkconfig", "--del", "acon") unless $ENV{LANGUAGE} =~ /ar/; + #- make the mdk fonts last in available fonts for buggy kde + run_program::rooted($o->{prefix}, "chkfontpath", "--remove", "/usr/X11R6/lib/X11/fonts/mdk"); + run_program::rooted($o->{prefix}, "chkfontpath", "--add", "/usr/X11R6/lib/X11/fonts/mdk"); + #- create /etc/sysconfig/desktop file according to user choice and presence of /usr/bin/kdm or /usr/bin/gdm. my $f = "$o->{prefix}/etc/sysconfig/desktop"; if ($o->{compssUsersChoice}{KDE} && -x "$o->{prefix}/usr/bin/kdm") { diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index d3b3954b4..0b8303954 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -718,7 +718,7 @@ sub create_steps_window { gtkadd($w->{window}, gtkpack_(new Gtk::VBox(0,0), - (map { 1, $_ } map { + (map {; 1, $_ } map { my $step = $o->{steps}{$_}; my $circle = $step->{done} && \@green_circle || @@ -807,7 +807,7 @@ END open F, ">$file" or die "can't create X configuration file $file"; print F <<END; Section "Files" - FontPath "/usr/X11R6/lib/X11/fonts:unscaled,/usr/X11R6/lib/X11/fonts" + FontPath "/usr/X11R6/lib/X11/fonts:unscaled" EndSection Section "Keyboard" diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index c30e5d74b..ddafab251 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -71,6 +71,14 @@ sub selectKeyboard($) { keyboard::keyboard2text($o->{keyboard}))); delete $o->{keyboard_unsafe}; install_steps::selectKeyboard($o); + + + if ($::expert) { + my $langs = $o->ask_many_from_list('', + _("You can choose other languages that will be available after install"), + [ lang::list() ]) or goto &selectLanguage if $::expert; + lang::set_langs($o->{langs} = grep_index { $langs->[$::i] } lang::list()); + } } #------------------------------------------------------------------------------ sub selectPath($) { diff --git a/perl-install/lang.pm b/perl-install/lang.pm index e100e6a44..6ceabf918 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -200,7 +200,7 @@ sub text2lang { } sub set { - my ($lang, $prefix) = @_; + my ($lang, $langs) = @_; if ($lang) { $ENV{LC_ALL} = $lang; @@ -208,7 +208,7 @@ sub set { $ENV{LANGUAGE} = $languages{$lang}[3]; #- apparently autoconf/automake doesn't like LINGUAS having a list of values #- $ENV{LINGUAS} = $languages{$lang}[3]; - $ENV{RPM_INSTALL_LANG} = $languages{$lang}[3]; + set_langs($langs || [$lang]); local $_ = $languages{$lang}[1]; s/iso-8859-1$/iso-8859-15/; @@ -226,6 +226,14 @@ sub set { } } +sub set_langs { + my ($l) = @_; + $ENV{RPM_INSTALL_LANG} = member('all', @$l) ? 'all' : + join ':', uniq(map { substr($languages{$_}[2], 0, 2) } @$l); + +# $ENV{RPM_INSTALL_LANG} = join ':', uniq(map { split ':', $languages{$_}[3] } @{$_[0]}); +} + sub write { my ($prefix) = @_; my $lang = $ENV{LC_ALL}; diff --git a/perl-install/modules.pm b/perl-install/modules.pm index 5dd266d99..4afacb5d3 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -88,6 +88,7 @@ arch() =~ /^sparc/ ? ( "8390" => "8390", "dummy" => "dummy", + "af_packet" => "packet socket", "nfs" => "Network File System (nfs)", "lockd" => "lockd", "sunrpc" => "sunrpc", @@ -132,6 +133,8 @@ arch() =~ /^sparc/ ? ( "qlogicisp" => "Qlogic ISP", "sym53c8xx" => "Symbios 53c8xx", "scsi_mod" => "scsi_mod", + "ide-mod" => "ide-mod", + "ide-probe" => "ide-probe", }], [ 'disk', { arch() =~ /^sparc/ ? ( diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index 4ad473202..fe940e3d7 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -92,11 +92,11 @@ sub gtksignal_connect($@) { } sub gtkpack($@) { my $box = shift; - gtkpack_($box, map { 1, $_} @_); + gtkpack_($box, map {; 1, $_ } @_); } sub gtkpack__($@) { my $box = shift; - gtkpack_($box, map { 0, $_} @_); + gtkpack_($box, map {; 0, $_ } @_); } sub gtkpack_($@) { my $box = shift; diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 4d8c591f4..02b571c25 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -25,18 +25,18 @@ autoirpm autoirpm-icons numlock my %by_lang = ( ar => [ 'acon' ], - cs => [ 'XFree86-ISO8859-2' ], - hr => [ 'XFree86-ISO8859-2' ], - hu => [ 'XFree86-ISO8859-2' ], + cs => [ 'XFree86-ISO8859-2', 'XFree86-ISO8859-2-75dpi-fonts' ], + hr => [ 'XFree86-ISO8859-2', 'XFree86-ISO8859-2-75dpi-fonts' ], + hu => [ 'XFree86-ISO8859-2', 'XFree86-ISO8859-2-75dpi-fonts' ], ja => [ 'rxvt-CLE', 'fonts-ttf-japanese', 'kterm' ], ko => [ 'rxvt-CLE', 'fonts-ttf-korean' ], - pl => [ 'XFree86-ISO8859-2' ], - ro => [ 'XFree86-ISO8859-2' ], + pl => [ 'XFree86-ISO8859-2', 'XFree86-ISO8859-2-75dpi-fonts' ], + ro => [ 'XFree86-ISO8859-2', 'XFree86-ISO8859-2-75dpi-fonts' ], ru => [ 'XFree86-cyrillic-fonts' ], - sk => [ 'XFree86-ISO8859-2' ], - sl => [ 'XFree86-ISO8859-2' ], - sr => [ 'XFree86-ISO8859-2' ], - tr => [ 'XFree86-ISO8859-9' ], + sk => [ 'XFree86-ISO8859-2', 'XFree86-ISO8859-2-75dpi-fonts' ], + sl => [ 'XFree86-ISO8859-2', 'XFree86-ISO8859-2-75dpi-fonts' ], + sr => [ 'XFree86-ISO8859-2', 'XFree86-ISO8859-2-75dpi-fonts' ], + 'tr' => [ 'XFree86-ISO8859-9', 'XFree86-ISO8859-9-75dpi-fonts' ], zh_CN => [ 'rxvt-CLE', 'fonts-ttf-gb2312' ], 'zh_TW.Big5' => [ 'rxvt-CLE', 'fonts-ttf-big5' ], ); @@ -262,9 +262,9 @@ sub readCompssList($$$) { } my %done; - my $locales = "locales-" . substr($ENV{LANG}, 0, 2); - if (my $p = $packages->{$locales}) { - foreach ($locales, @{$p->{provides} || []}, @{$by_lang{$ENV{LANG}} || []}) { + foreach (split ':', $ENV{RPM_INSTALL_LANG}) { + my $p = $packages->{"locales-$_"} || {}; + foreach ("locales-$_", @{$p->{provides} || []}, @{$by_lang{$_} || []}) { next if $done{$_}; $done{$_} = 1; my $p = $packages->{$_} or next; $p->{values} = [ map { $_ + 90 } @{$p->{values} || [ (0) x $nb_values ]} ]; diff --git a/perl-install/resize_fat/io.pm b/perl-install/resize_fat/io.pm index cbe0033ca..2c106b87c 100644 --- a/perl-install/resize_fat/io.pm +++ b/perl-install/resize_fat/io.pm @@ -4,6 +4,7 @@ use diagnostics; use strict; use resize_fat::fat; +use c; 1; @@ -24,23 +25,18 @@ sub write($$$$) { sub read_cluster($$) { my ($fs, $cluster) = @_; my $buf; + my $pos = $fs->{cluster_offset} / 512 + $cluster * ($fs->{cluster_size} / 512); - eval { - $buf = &read($fs, - $fs->{cluster_offset} + $cluster * $fs->{cluster_size}, - $fs->{cluster_size}); - }; @$ and die "reading cluster #$cluster failed on device $fs->{fs_name}"; + c::lseek_sector(fileno $fs->{fd}, $pos, 0) or die "seeking to sector #$pos failed on device $fs->{fs_name}"; + sysread $fs->{fd}, $buf, $fs->{cluster_size} or die "reading at sector #$pos failed on device $fs->{fs_name}"; $buf; } sub write_cluster($$$) { my ($fs, $cluster, $buf) = @_; + my $pos = $fs->{cluster_offset} / 512 + $cluster * ($fs->{cluster_size} / 512); - eval { - &write($fs, - $fs->{cluster_offset} + $cluster * $fs->{cluster_size}, - $fs->{cluster_size}, - $buf); - }; @$ and die "writing cluster #$cluster failed on device $fs->{fs_name}"; + c::lseek_sector(fileno $fs->{fd}, $pos, 0) or die "seeking to sector #$pos failed on device $fs->{fs_name}"; + syswrite $fs->{fd}, $buf or die "writing at sector #$pos failed on device $fs->{fs_name}"; } sub read_file($$) { diff --git a/perl-install/share/compssList b/perl-install/share/compssList index 1263203b1..c4f9f5299 100644 --- a/perl-install/share/compssList +++ b/perl-install/share/compssList @@ -34,8 +34,8 @@ SysVinit 15 52 45 TiMidity++ 51 0 54 WMRack 40 0 32 WindowMaker 59 0 57 -Wnn 0 0 0 -Wnn-devel 0 0 0 +Wnn -20 -20 -20 +Wnn-devel -70 -60 -40 X11R6-contrib 55 0 47 XFree86-100dpi-fonts 56 0 30 XFree86 88 0 81 @@ -46,9 +46,9 @@ XFree86-8514 -30 -30 -30 XFree86-AGX -30 -30 -30 XFree86-FBDev -30 -30 -30 XFree86-I128 -30 -30 -30 -XFree86-ISO8859-9-100dpi-fonts -10 -20 -10 -XFree86-ISO8859-9 -10 -20 -10 -XFree86-ISO8859-9-75dpi-fonts -10 -20 -10 +XFree86-ISO8859-9-100dpi-fonts -20 -30 -20 +XFree86-ISO8859-9 -20 -30 -20 +XFree86-ISO8859-9-75dpi-fonts -20 -30 -20 XFree86-Mach32 -30 -30 -30 XFree86-Mach64 -30 -30 -30 XFree86-Mach8 -30 -30 -30 @@ -63,7 +63,7 @@ XFree86-W32 -30 -30 -30 XFree86-XF86Setup 71 0 58 XFree86-Xnest 0 0 55 XFree86-Xvfb 25 0 31 -XFree86-cyrillic-fonts 25 0 29 +XFree86-cyrillic-fonts -20 -30 -20 XFree86-devel 12 0 55 XFree86-libs 10 0 0 XFree86-xfs 0 0 0 @@ -73,11 +73,11 @@ Xconfigurator 0 0 0 aalib 25 0 15 aalib-devel 0 0 25 abisuite 69 0 45 -acon 0 0 0 +acon -10 -10 -10 adjtimex 22 35 87 aktion 76 0 15 am-utils 0 25 19 -ami -10 -10 -10 +ami -20 -20 -20 ami-gnome -20 -20 -20 anacron 85 70 85 anonftp 0 86 13 diff --git a/perl-install/share/list b/perl-install/share/list index cd22b741a..fe0578b7e 100644 --- a/perl-install/share/list +++ b/perl-install/share/list @@ -46,6 +46,7 @@ /usr/lib/perl5/5.00503/Carp.pm /usr/lib/perl5/5.00503/Data/Dumper.pm /usr/lib/perl5/5.00503/Exporter.pm +/usr/lib/perl5/5.00503/Exporter/Heavy.pm /usr/lib/perl5/5.00503/FileHandle.pm /usr/lib/perl5/5.00503/SelectSaver.pm /usr/lib/perl5/5.00503/SelfLoader.pm @@ -55,6 +56,7 @@ /usr/lib/perl5/5.00503/ARCH-linux/Config.pm /usr/lib/perl5/5.00503/ARCH-linux/DynaLoader.pm /usr/lib/perl5/5.00503/ARCH-linux/Fcntl.pm +/usr/lib/perl5/5.00503/ARCH-linux/XSLoader.pm /usr/lib/perl5/5.00503/ARCH-linux/auto/Fcntl/Fcntl.bs /usr/lib/perl5/5.00503/ARCH-linux/auto/Fcntl/Fcntl.so /usr/lib/perl5/5.00503/ARCH-linux/IO/File.pm |