From 55d44a1b5c6e4d2f45d365fe7680aa619c831506 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 18 Apr 2000 14:38:41 +0000 Subject: no_comment --- perl-install/Makefile | 4 ++-- perl-install/Xconfigurator_consts.pm | 6 +++--- perl-install/any.pm | 2 +- perl-install/commands.pm | 5 +++-- perl-install/fs.pm | 1 + perl-install/help.pm | 20 ++------------------ perl-install/install2.pm | 12 ++++++------ perl-install/install_steps.pm | 5 ++++- perl-install/install_steps_gtk.pm | 9 +++++++-- perl-install/install_steps_interactive.pm | 2 +- perl-install/lang.pm | 2 +- perl-install/modules.pm | 3 ++- perl-install/my_gtk.pm | 5 +++-- perl-install/pkgs.pm | 4 ++-- perl-install/share/list | 1 + update_kernel | 2 +- 16 files changed, 40 insertions(+), 43 deletions(-) diff --git a/perl-install/Makefile b/perl-install/Makefile index 01f1786b4..1143fbd0b 100644 --- a/perl-install/Makefile +++ b/perl-install/Makefile @@ -123,8 +123,8 @@ endif cd share ; cp -a themes $(DEST)/usr/share/gtk cd share ; cp compssUsers compssList $(ROOTDEST)/Mandrake/base - if [ -f "../modules/modules.cz2" ]; then \ - cp -f ../modules/modules.cz2 $(DEST)/lib/; \ + if [ -f ../modules/modules.cz* ]; then \ + cp -f ../modules/modules.cz* $(DEST)/lib/; \ else \ cp -f ../modules/modules.cpio.bz2 $(DEST)/lib/; \ install -d $(DEST)/lib/modules; \ diff --git a/perl-install/Xconfigurator_consts.pm b/perl-install/Xconfigurator_consts.pm index d294cad45..d59062999 100644 --- a/perl-install/Xconfigurator_consts.pm +++ b/perl-install/Xconfigurator_consts.pm @@ -326,7 +326,7 @@ $default_monitor = "High Frequency SVGA, 1024x768 at 70 Hz"; 'ru' => [ 'XkbVariant "winkeys"', 'XkbOptions "grp:caps_toggle"' ], ); -$XF86firstchunk_text = ' +$XF86firstchunk_text = q( # File generated by XFdrake. # ********************************************************************** @@ -366,7 +366,7 @@ Section "ServerFlags" #DontZoom # This allows the server to start up even if the - # mouse device can\'t be opened/initialised. + # mouse device can't be opened/initialised. AllowMouseOpenFail EndSection @@ -374,7 +374,7 @@ EndSection # ********************************************************************** # Input devices # ********************************************************************** -'; +); $keyboardsection_start = ' # ********************************************************************** diff --git a/perl-install/any.pm b/perl-install/any.pm index 3dc8f5b8b..a5dd80f64 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -62,7 +62,7 @@ sub setupBootloader { $in->set_help('setupBootloaderBeginner') unless $::isStandalone; my $boot = $hds->[0]{device}; my $onmbr = "/dev/$boot" eq $b->{boot}; - $b->{boot} = "/dev/" . ($in->ask_from_list_(_("LILO Installation"), + $b->{boot} = "/dev/" . ($in->ask_from_list_(_("LILO/grub Installation"), _("Where do you want to install the bootloader?"), \@l, $l[!$onmbr]) eq $l[0] ? $boot : fsedit::get_root($fstab, 'boot')->{device}); diff --git a/perl-install/commands.pm b/perl-install/commands.pm index c7f75a447..09f7ecd97 100644 --- a/perl-install/commands.pm +++ b/perl-install/commands.pm @@ -423,8 +423,9 @@ sub insmod { $_ = $1 if m@.*/([^/]*)\.o@; unless (-r ($f = "/lib/modules/$_.o")) { $f = "/tmp/$_.o"; - if (-e "/lib/modules.cz2") { - run_program::run("extract_archive /lib/modules.cz2 /tmp $_.o"); + my $cz = "/lib/modules.cz"; -e $cz or $cz .= "2"; + if (-e $cz) { + run_program::run("extract_archive $cz /tmp $_.o"); } elsif (-e "/lib/modules.cpio.bz2") { run_program::run("cd /tmp ; bzip2 -cd /lib/modules.cpio.bz2 | cpio -i $_.o"); } else { diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 485f24660..ed3bed4e1 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -390,6 +390,7 @@ sub write_fstab($;$$) { local *F; open F, "> $prefix/etc/fstab" or die "error writing $prefix/etc/fstab"; print F join(" ", @$_), "\n" foreach sort { $a->[1] cmp $b->[1] } @to_add; + log::l("fstab: ", join(" ", @$_)) foreach sort { $a->[1] cmp $b->[1] } @to_add; } sub merge_fstabs { diff --git a/perl-install/help.pm b/perl-install/help.pm index 95e53334b..cd31fef60 100644 --- a/perl-install/help.pm +++ b/perl-install/help.pm @@ -331,7 +331,7 @@ setupBootloader => (primary master IDE disk) or \"/dev/sda\" (first SCSI disk)."), setupBootloaderAddEntry => - __("LILO (the LInux LOader) can boot Linux and other operating systems. + __("LILO (the LInux LOader) or grub can boot Linux and other operating systems. Normally they are correctly detected during installation. If you don't see yours detected, you can add one or more now. @@ -340,28 +340,12 @@ If you don't want that everybody could access at one of them, you can remove it now (a boot disk will be needed to boot it)."), setupBootloaderGeneral => - __("LILO main options are: + __("LILO and grub main options are: - Boot device: Sets the name of the device (e.g. a hard disk partition) that contains the boot sector. Unless you know specifically otherwise, choose \"/dev/hda\". - - Linear: Generate linear sector addresses instead of -sector/head/cylinder addresses. Linear addresses are translated at run -time and do not depend on disk geometry. Note that boot disks may not be -portable if \"linear\" is used, because the BIOS service to determine the -disk geometry does not work reliably for floppy disks. When using -\"linear\" with large disks, /sbin/lilo may generate references to -inaccessible disk areas, because 3D sector addresses are not known -before boot time. - - - - Compact: Tries to merge read requests for adjacent sectors into a -single read request. This drastically reduces load time and keeps the -map smaller. Using \"compact\" is especially recommended when booting from -a floppy disk. - - - Delay before booting default image: Specifies the number in tenths of a second the boot loader should wait before booting the first image. This is useful on systems that immediately boot from the hard disk after diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 8bd94c67b..3f9414a78 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -491,12 +491,12 @@ sub exitInstall { $o->exitInstall(getNextStep() eq "exitInstall") } #-###################################################################################### sub main { $SIG{__DIE__} = sub { chomp(my $err = $_[0]); log::l("warning: $err") }; -# $SIG{SEGV} = sub { my $msg = "segmentation fault: seems like memory is missing as the install crashes"; print "$msg\n"; log::l($msg); -# $o->ask_warn('', $msg); -# setVirtual(1); -# require install_steps_auto_install; -# install_steps_auto_install::errorInStep(); -# }; + $SIG{SEGV} = sub { my $msg = "segmentation fault: seems like memory is missing as the install crashes"; print "$msg\n"; log::l($msg); + $o->ask_warn('', $msg); + setVirtual(1); + require install_steps_auto_install; + install_steps_auto_install::errorInStep(); + }; $ENV{SHARE_PATH} ||= "/usr/share"; $ENV{DURING_INSTALL} = 1; diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 256f37122..9bb3bd26a 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -329,7 +329,10 @@ Consoles 1,3,4,7 may also contain interesting information"; run_program::rooted($o->{prefix}, "chkfontpath", "--add", "/usr/X11R6/lib/X11/fonts/mdk"); #- call update-menus at the end of package installation - run_program::rooted($o->{prefix}, "update-menus"); + { + local $ENV{DURING_INSTALL}; undef $ENV{DURING_INSTALL}; + run_program::rooted($o->{prefix}, "update-menus"); + } #- mainly for auto_install's run_program::rooted($o->{prefix}, "sh", "-c", $o->{postInstall}) if $o->{postInstall}; diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 351a58d5b..79dafaddc 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -359,6 +359,7 @@ sub choosePackagesTree { my $pix_base = [ gtkcreate_xpm($w->{window}, "$ENV{SHARE_PATH}/rpm-base.xpm") ]; my $pix_selected = [ gtkcreate_xpm($w->{window}, "$ENV{SHARE_PATH}/rpm-selected.xpm") ]; my $pix_unselect = [ gtkcreate_xpm($w->{window}, "$ENV{SHARE_PATH}/rpm-unselected.xpm") ]; + my $pix_installed= [ gtkcreate_xpm($w->{window}, "$ENV{SHARE_PATH}/rpm-installed.xpm") ]; my $parent; $parent = sub { if (my $w = $wtree{$_[0]}) { return $w } @@ -374,7 +375,7 @@ sub choosePackagesTree { my $node = $tree->insert_node($parent->($root), undef, [$leaf, '', ''], 5, (undef) x 4, 1, 0); my $p = $packages->[0]{$leaf} or return; $p->{medium}{selected} or return; - my $pix = pkgs::packageFlagBase($p) ? $pix_base : pkgs::packageFlagSelected($p) ? $pix_selected : $pix_unselect; + my $pix = pkgs::packageFlagBase($p) ? $pix_base : pkgs::packageFlagSelected($p) ? $pix_selected : pkgs::packageFlagInstalled($p) ? $pix_installed : $pix_unselect; $tree->node_set_pixmap($node, 1, $pix->[0], $pix->[1]); push @{$ptree{$leaf}}, $node; }; @@ -443,6 +444,10 @@ sub choosePackagesTree { $tree->toggle_expansion($curr); } else { my $p = $packages->[0]{$curr} or return; + if (pkgs::packageFlagBase($p)) { + $o->ask_warn('', _("This is a mandatory package, it can't be unselected")); + return; + } pkgs::togglePackageSelection($packages, $p, my $l = {}); if (my @l = grep { $l->{$_} } keys %$l) { @l > 1 && !$auto_deps and $o->ask_okcancel('', [ _("The following packages are going to be installed/removed"), join(", ", sort @l) ], 1) || return; @@ -454,7 +459,7 @@ sub choosePackagesTree { } &$update_size; } else { - $o->ask_warn('', _("This is a mandatory package, it can't be unselected")); + $o->ask_warn('', _("You can't unselect this package")); } } }; diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index fd955d627..4e2a9be74 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -710,7 +710,7 @@ sub createBootdisk { $o->ask_yesorno('', _("A custom bootdisk provides a way of booting into your Linux system without depending on the normal bootloader. This is useful if you don't want to install -LILO on your system, or another operating system removes LILO, or LILO doesn't +LILO (or grub) on your system, or another operating system removes LILO, or LILO doesn't work with your hardware configuration. A custom bootdisk can also be used with the Mandrake rescue image, making it much easier to recover from severe system failures. Would you like to create a bootdisk for your system?"), diff --git a/perl-install/lang.pm b/perl-install/lang.pm index b7a1ffb53..69a2c7b90 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -260,7 +260,7 @@ sub write { add2hash $h, { LC_MONETARY => $lang }; add2hash $h, { LC_TIME => $lang }; if (my $l = $languages{$lang}) { - add2hash $h, { LANG => $l->[2], LANGUAGE => $l->[3], RPM_LANG_INSTALL => $l->[3] }; + add2hash $h, { LANG => $l->[2], LANGUAGE => $l->[3], RPM_INSTALL_LANG => $l->[3] }; my $c = $charsets{$l->[1] || ''}; if ($c && $c->[0] && $c->[1]) { diff --git a/perl-install/modules.pm b/perl-install/modules.pm index 1b8d58dfa..2a099d2dc 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -401,7 +401,8 @@ sub load_multi { $::testing and log::l("i would install modules @l"), return; - run_program::run("extract_archive", "/lib/modules.cz2", "/tmp", map { "$_.o" } @l); + my $cz = "/lib/modules.cz"; -e $cz or $cz .= "2"; + run_program::run("extract_archive", $cz, "/tmp", map { "$_.o" } @l); run_program::run(["insmod_", "insmod"], "/tmp/$_.o") and $conf{$_}{loaded} = 1 foreach @l; unlink map { "/tmp/$_.o" } @l; } diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index 72dab6b11..65517c8a0 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -203,9 +203,10 @@ sub create_okcancel($;$$) { sub create_box_with_title($@) { my $o = shift; - $o->{box} = (@_ <= 2 && (map { split "\n" } @_) > 6) ? + my $nb_lines = map { split "\n" } @_; + $o->{box} = (@_ <= 2 && $nb_lines > 3) ? gtkpack(new Gtk::VBox(0,0), - gtkset_usize(createScrolledWindow(gtktext_insert(new Gtk::Text, join "\n", @_)), 400, 250)) : + gtkset_usize(createScrolledWindow(gtktext_insert(new Gtk::Text, join "\n", @_)), 400, min(250, $nb_lines * 20))) : gtkpack_(new Gtk::VBox(0,0), (map { my $w = ref $_ ? $_ : new Gtk::Label($_); diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 7eb9ede5b..936831380 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -870,7 +870,6 @@ sub install($$$;$$) { $fd ? fileno $fd : -1; }; my $callbackClose = sub { packageSetFlagInstalled(delete $packages{$_[0]}, 1) }; - my $callbackInstall = sub { &installCallback }; #- do not modify/translate the message used with installCallback since #- these are keys during progressing installation, or change in other @@ -988,7 +987,6 @@ sub install($$$;$$) { c::headerFree(delete $_->{header}) foreach @transToInstall; cleanHeaders($prefix); - #- check for uninstalled package, avoid keeping them selected to avoid trying installing them again! if (my @badpkgs = grep { !packageFlagInstalled($_) } @transToInstall) { foreach (@badpkgs) { log::l("bad package $_->{file}"); @@ -998,6 +996,8 @@ sub install($$$;$$) { } } while ($nb > 0 && !$pkgs::cancel_install); + cleanHeaders($prefix); + loopback::save_boot($loop_boot); } diff --git a/perl-install/share/list b/perl-install/share/list index fd495cac8..6300afded 100644 --- a/perl-install/share/list +++ b/perl-install/share/list @@ -1,5 +1,6 @@ /bin/ash /bin/cpio +/bin/gzip /lib/libnss_nis.so.2 /lib/libnss_files.so.2 /lib/libnss_dns.so.2 diff --git a/update_kernel b/update_kernel index 7feb8ff32..6e1ee46e6 100755 --- a/update_kernel +++ b/update_kernel @@ -42,7 +42,7 @@ rm -rf modules ; install -d modules cp -f `find ../"$KERNEL_BOOT_PATH"/lib/modules/ -name "*.o"` . /sbin/depmod -m ../System.map -i -e *.o | perl -pe 's/\\\n//' | perl -ne 's/\.o//g; s/[ \t]+/ /g; print if /: /' > modules.dep perl -pi -e 's/((plip|ppa|imm): parport)/$1 parport_pc/' modules.dep - ls *.o | build_archive modules.cz2 400000 + ls *.o | build_archive modules.cz 400000 ls *.o | cpio --quiet -H crc -o | bzip2 -9> modules.cpio.bz2 ls $NETWORK_MODULES | cpio --quiet -H crc -o | gzip -9 > network_modules.cgz ls $CDROM_MODULES | cpio --quiet -H crc -o | gzip -9 > cdrom_modules.cgz -- cgit v1.2.1