diff options
Diffstat (limited to 'perl-install/install/steps_interactive.pm')
| -rw-r--r-- | perl-install/install/steps_interactive.pm | 361 |
1 files changed, 202 insertions, 159 deletions
diff --git a/perl-install/install/steps_interactive.pm b/perl-install/install/steps_interactive.pm index a956419a7..55985e01a 100644 --- a/perl-install/install/steps_interactive.pm +++ b/perl-install/install/steps_interactive.pm @@ -1,7 +1,8 @@ -package install::steps_interactive; # $Id$ +package install::steps_interactive; use strict; +use feature 'state'; our @ISA = qw(install::steps); @@ -35,7 +36,7 @@ use log; #-###################################################################################### sub errorInStep { my ($o, $err) = @_; - $err = ugtk2::escape_text_for_TextView_markup_format($err) if $o->isa('install::steps_gtk'); + $err = ugtk3::escape_text_for_TextView_markup_format($err) if $o->isa('install::steps_gtk'); $o->ask_warn(N("Error"), [ N("An error occurred"), formatError($err) ]); } @@ -53,7 +54,7 @@ sub acceptLicense { my ($o) = @_; return if $o->{useless_thing_accepted}; - any::acceptLicense($o, $o->{meta_class} eq 'powerpack'); + any::acceptLicense($o); } sub selectLanguage { @@ -74,7 +75,7 @@ fonts, spell checkers, various programs translated etc. that varies from language to language).")) if $o->{locale}{lang} !~ /^en/ && !lang::load_mo(); } else { #- no need to have this in po since it is never translated - $o->ask_warn('', "The characters of your language can not be displayed in console, + $o->ask_warn('', "The characters of your language cannot be displayed in console, so the messages will be displayed in english during installation") if $ENV{LANGUAGE} eq 'C'; } } @@ -125,71 +126,79 @@ sub selectKeyboard { sub selectInstallClass { my ($o) = @_; - if (my @l = install::any::find_root_parts($o->{fstab}, $::prefix)) { - log::l("proposing to upgrade partitions " . join(" ", map { $_->{part} && $_->{part}{device} } @l)); + return if $::isRestore; - my @releases = uniq(map { $_->{release} } @l); - if (@releases != @l) { - #- same release name so adding the device to differentiate them: - $_->{release} .= " ($_->{part}{device})" foreach @l; - } + my @l = install::any::find_root_parts($o->{fstab}, $::prefix); + # Don't list other archs as ugrading between archs is not supported + my $arch = arch() =~ /i.86/ ? $MDK::Common::System::compat_arch{arch()} : arch(); + # Offer to upgrade only same arch and not mdv-2011+: + @l = grep { $_->{arch} eq $arch && $_->{version} !~ /201[1-9]/ } @l; + if (@l) { + _try_to_upgrade($o, @l); + } +} - askInstallClass: - my $p; - $o->ask_from_({ title => N("Install/Upgrade"), - interactive_help_id => 'selectInstallClass', - }, - [ - { label => N("Is this an install or an upgrade?"), title => 1 }, - { val => \$p, - list => [ @l, N_("_: This is a noun:\nInstall") ], - type => 'list', - format => sub { ref($_[0]) ? N("Upgrade %s", $_[0]{release}) : translate($_[0]) } - } ]); - if (ref $p) { - if (arch() =~ /x86_64/ && $p->{arch} eq 'i586') { - $o->ask_warn('', N("Upgrade from a 32bit to a 64bit distribution is not supported")); - goto askInstallClass; - } - if (arch() =~ /i.86/ && $p->{arch} eq 'x86_64') { - $o->ask_warn('', N("Upgrade from a 64bit to a 32bit distribution is not supported")); - goto askInstallClass; - } +sub _try_to_upgrade { + my ($o, @l) = @_; + log::l("proposing to upgrade partitions " . join(" ", map { $_->{part} && $_->{part}{device} } @l)); - _check_unsafe_upgrade_and_warn($o, $p->{part}) or $p = undef; - } + my @releases = uniq(map { "$_->{release} $_->{version}" } @l); + if (@releases != @l) { + #- same release name so adding the device to differentiate them: + $_->{release} .= " ($_->{part}{device})" foreach @l; + } - if (ref $p) { + askInstallClass: + my $p; + $o->ask_from_({ title => N("Install/Upgrade"), + interactive_help_id => 'selectInstallClass', + }, + [ + { label => N("Is this an install or an upgrade?"), title => 1 }, + { val => \$p, + list => [ @l, N_("_: This is a noun:\nInstall") ], + type => 'list', + format => sub { ref($_[0]) ? N("Upgrade %s", "$_[0]->{release} $_[0]->{version}") : translate($_[0]) } + } ]); + if (ref $p) { + _check_unsafe_upgrade_and_warn($o, $p->{part}) or $p = undef; + } - if ($p->{part}) { - log::l("choosing to upgrade partition $p->{part}{device}"); - $o->{migrate_device_names} = install::any::use_root_part($o->{all_hds}, $p->{part}, $o); - } + if (ref $p) { + _prepare_upgrade($o, $p); + } +} - #- handle encrypted partitions (esp. /home) - foreach (grep { $_->{mntpoint} } @{$o->{fstab}}) { - my ($options, $_unknown) = fs::mount_options::unpack($_); - $options->{encrypted} or next; - $o->ask_from_({ focus_first => 1 }, - [ { label => N("Encryption key for %s", $_->{mntpoint}), - hidden => 1, val => \$_->{encrypt_key} } ]); - } +sub _prepare_upgrade { + my ($o, $p) = @_; + if ($p->{part}) { + log::l("choosing to upgrade partition $p->{part}{device}"); + $o->{migrate_device_names} = install::any::use_root_part($o->{all_hds}, $p->{part}, $o); + } - $o->{previous_release} = $p; - $o->{isUpgrade} = (find { $p->{release_file} =~ /$_/ } 'mandriva', 'mandrake', 'conectiva', 'redhat') || 'unknown'; - $o->{upgrade_by_removing_pkgs_matching} ||= { - conectiva => 'cl', - redhat => '.', #- everything! - }->{$o->{isUpgrade}}; - log::l("upgrading $o->{isUpgrade} distribution" . ($o->{upgrade_by_removing_pkgs_matching} ? " (upgrade_by_removing_pkgs_matching $o->{upgrade_by_removing_pkgs_matching})" : '')); - } + #- handle encrypted partitions (esp. /home) + foreach (grep { $_->{mntpoint} } @{$o->{fstab}}) { + my ($options, $_unknown) = fs::mount_options::unpack($_); + $options->{encrypted} or next; + $o->ask_from_({ focus_first => 1 }, + [ { label => N("Encryption key for %s", $_->{mntpoint}), + hidden => 1, val => \$_->{encrypt_key} } ]); } + + $o->{previous_release} = $p; + $o->{isUpgrade} = (find { $p->{release_file} =~ /$_/ } 'mageia', 'mandriva', 'mandrake', 'conectiva', 'redhat') || 'unknown'; + $o->{upgrade_by_removing_pkgs_matching} ||= { + conectiva => 'cl', + redhat => '.', #- everything! + }->{$o->{isUpgrade}}; + log::l("upgrading $o->{isUpgrade} distribution" . ($o->{upgrade_by_removing_pkgs_matching} ? " (upgrade_by_removing_pkgs_matching $o->{upgrade_by_removing_pkgs_matching})" : '')); } sub _check_unsafe_upgrade_and_warn { my ($o, $part) = @_; !_is_unsafe_upgrade($part) || _warn_unsafe_upgrade($o); } + sub _is_unsafe_upgrade { my ($part) = @_; @@ -198,6 +207,7 @@ sub _is_unsafe_upgrade { log::l("block_size $block_size"); $block_size == 1024; } + sub _warn_unsafe_upgrade { my ($o) = @_; @@ -210,13 +220,13 @@ sub _warn_unsafe_upgrade { ); my $choice; - $o->ask_from_({ messages => N("Installer has detected that your installed Mandriva Linux system could not + $o->ask_from_({ messages => N("Installer has detected that your installed Linux system could not safely be upgraded to %s. New installation replacing your previous one is recommended. Warning : you should backup all your personal data before choosing \"New -Installation\".", 'Mandriva Linux 2009') }, +Installation\".", '%s') }, [ { val => \$choice, type => 'list', list => \@choices, format => \&translate } ]); log::l("_warn_unsafe_upgrade: got $choice"); @@ -241,7 +251,6 @@ sub selectMouse { if ($o->{mouse}{device} eq "input/mice") { modules::interactive::load_category($o, $o->{modules_conf}, 'bus/usb', 1, 0); eval { - devices::make("usbmouse"); modules::load('usbhid'); }; } @@ -252,14 +261,14 @@ sub setupSCSI { install::any::configure_pcmcia($o); { - my $_w = $o->wait_message(N("IDE"), N("Configuring IDE")); + my $_w = $o->wait_message(N("CD/DVD"), N("Configuring CD/DVD")); modules::load(modules::category2modules('disk/cdrom')); } modules::interactive::load_category($o, $o->{modules_conf}, 'bus/firewire', 1); my $have_non_scsi = detect_devices::hds(); #- at_least_one scsi device if we have no disks - modules::interactive::load_category($o, $o->{modules_conf}, 'disk/card_reader|ide|scsi|hardware_raid|sata|firewire', 1, !$have_non_scsi); - modules::interactive::load_category($o, $o->{modules_conf}, 'disk/card_reader|ide|scsi|hardware_raid|sata|firewire') if !detect_devices::hds(); #- we really want a disk! + modules::interactive::load_category($o, $o->{modules_conf}, 'disk/card_reader|ide|scsi|hardware_raid|sata|firewire|virtual', 1, !$have_non_scsi); + modules::interactive::load_category($o, $o->{modules_conf}, 'disk/card_reader|ide|scsi|hardware_raid|sata|firewire|virtual') if !detect_devices::hds(); #- we really want a disk! install::interactive::tellAboutProprietaryModules($o); @@ -270,34 +279,6 @@ sub setupSCSI { sub doPartitionDisks { my ($o) = @_; - if (arch() =~ /ppc/) { - my $generation = detect_devices::get_mac_generation(); - if ($generation =~ /NewWorld/) { - #- mac partition table - if (defined $partition_table::mac::bootstrap_part) { - #- do not do anything if we've got the bootstrap setup - #- otherwise, go ahead and create one somewhere in the drive free space - } else { - my $freepart = $partition_table::mac::freepart; - if ($freepart && $freepart->{size} >= 1) { - log::l("creating bootstrap partition on drive /dev/$freepart->{hd}{device}, block $freepart->{start}"); - $partition_table::mac::bootstrap_part = $freepart->{part}; - log::l("bootstrap now at $partition_table::mac::bootstrap_part"); - my $p = { start => $freepart->{start}, size => MB(1), mntpoint => '' }; - fs::type::set_pt_type($p, 0x401); - fsedit::add($freepart->{hd}, $p, $o->{all_hds}, { force => 1, primaryOrExtended => 'Primary' }); - $partition_table::mac::new_bootstrap = 1; - - } else { - $o->ask_warn('', N("No free space for 1MB bootstrap! Install will continue, but to boot your system, you'll need to create the bootstrap partition in DiskDrake")); - } - } - } elsif ($generation =~ /IBM/) { - #- dos partition table - $o->ask_warn('', N("You'll need to create a PPC PReP Boot bootstrap! Install will continue, but to boot your system, you'll need to create the bootstrap partition in DiskDrake")); - } - } - if (!$o->{isUpgrade}) { fs::partitioning_wizard::main($o, $o->{all_hds}, $o->{fstab}, $o->{manualFstab}, $o->{partitions}, $o->{partitioning}, $::local_install); } @@ -337,13 +318,13 @@ If you want to skip some of them, you can unselect them now.")) }, if_($_ eq $names[0], disabled => sub { 1 }), } } @names), if_($o_copy_rpms_on_disk, - { type => 'label', val => \(formatAlaTeX(N("You have the option to copy the contents of the CDs onto the hard drive before installation. -It will then continue from the hard drive and the packages will remain available once the system is fully installed."))) }, + { type => 'label', val => \(formatAlaTeX(N("You have the option to copy the contents of the CDs onto the hard disk drive before installation. +It will then continue from the hard disk drive and the packages will remain available once the system is fully installed."))) }, { type => 'bool', text => N("Copy whole CDs"), val => $o_copy_rpms_on_disk }, ), ]); - $_->{selected} = $selection{$_->{name}} foreach @$hdlists; - log::l("keeping media " . join ',', map { $_->{rpmsdir} } grep { $_->{selected} } @$hdlists); + $_->{ignore} = !$selection{$_->{name}} foreach @$hdlists; + log::l("keeping media " . join ',', map { $_->{rpmsdir} } grep { !$_->{ignore} } @$hdlists); } sub while_suspending_time { @@ -369,6 +350,7 @@ sub ask_change_cd { sub ask_change_cd_ { my ($o, $medium) = @_; + local $::isWizard = 0; # make button name match text, aka being "cancel" rather than "previous" $o->ask_okcancel('', N("Change your Cd-Rom! Please insert the Cd-Rom labelled \"%s\" in your drive and press Ok when done. If you do not have it, press Cancel to avoid installation from this Cd-Rom.", $medium), 1) or return; @@ -379,6 +361,7 @@ sub selectSupplMedia { my ($o) = @_; install::any::selectSupplMedia($o); } + #------------------------------------------------------------------------------ sub choosePackages { my ($o) = @_; @@ -404,7 +387,7 @@ sub choosePackages { my ($individual, $chooseGroups); if (!$o->{isUpgrade}) { - my $tasks_ok = install::pkgs::packageByName($o->{packages}, 'task-kde4') && + my $tasks_ok = install::pkgs::packageByName($o->{packages}, 'task-plasma-minimal') && install::pkgs::packageByName($o->{packages}, 'task-gnome-minimal'); if ($tasks_ok && $availableC >= 2_500_000_000) { _chooseDesktop($o, $o->{rpmsrate_flags_chosen}, \$chooseGroups); @@ -438,6 +421,7 @@ sub choosePackagesTree { sort => 1, }); } + sub loadSavePackagesOnFloppy { my ($o, $packages) = @_; $o->ask_from('', @@ -463,11 +447,12 @@ The format is the same as auto_install generated files."), install::any::g_default_packages($o); } } + sub _chooseDesktop { my ($o, $rpmsrate_flags_chosen, $chooseGroups) = @_; my @l = group_by2( - KDE => N("KDE"), + PLASMA => N("Plasma"), GNOME => N("GNOME"), Custom => N("Custom"), ); @@ -477,6 +462,7 @@ sub _chooseDesktop { my $default_choice = (find { $rpmsrate_flags_chosen->{"CAT_" . $_->[0]} } @l) || $l[0]; my $choice = $default_choice; if ($o->isa('interactive::gtk')) { + # perl_checker: require install::steps_gtk $choice = install::steps_gtk::reallyChooseDesktop($o, $title, $message, \@l, $default_choice); } else { $o->ask_from_({ title => $title, message => $message }, [ @@ -485,7 +471,7 @@ sub _chooseDesktop { } my $desktop = $choice->[0]; log::l("chosen Desktop: $desktop"); - my @desktops = ('KDE', 'GNOME'); + my @desktops = ('PLASMA', 'GNOME'); if (member($desktop, @desktops)) { my ($want, $dontwant) = ($desktop, grep { $desktop ne $_ } @desktops); $rpmsrate_flags_chosen->{"CAT_$want"} = 1; @@ -497,9 +483,12 @@ sub _chooseDesktop { $$chooseGroups = 1; } } + sub chooseGroups { my ($o, $packages, $compssUsers, $individual) = @_; + my $w = $o->wait_message('', N("Looking for available packages...")); + #- for all groups available, determine package which belongs to each one. #- this will enable getting the size of each groups more quickly due to #- limitation of current implementation. @@ -516,6 +505,8 @@ sub chooseGroups { my %stable_flags = grep_each { $::b } %{$o->{rpmsrate_flags_chosen}}; delete $stable_flags{"CAT_$_"} foreach map { @{$_->{flags}} } @{$o->{compssUsers}}; + undef $w; + my $compute_size = sub { my %pkgs; my %flags = %stable_flags; @flags{@_} = (); @@ -564,37 +555,49 @@ sub chooseGroups { log::l("compssUsersChoice selected: ", join(', ', map { qq("$_->{path}|$_->{label}") } grep { $_->{selected} } @$compssUsers)); - #- do not try to deselect package (by default no groups are selected). if (!$o->{isUpgrade}) { + #- do not try to deselect package (by default no groups are selected). install::any::unselectMostPackages($o) if $unselect_all; + + #- if no group have been chosen, ask for using base system only, or no X, or normal. + if (!any { $_->{selected} } @$compssUsers) { + offer_minimal_options($o) or goto &chooseGroups; + } } - #- if no group have been chosen, ask for using base system only, or no X, or normal. - if (!$o->{isUpgrade} && !any { $_->{selected} } @$compssUsers) { + 1; +} + +sub offer_minimal_options { + my ($o) = @_; my $docs = !$o->{excludedocs}; - my $minimal; + state $minimal; + my $recommends = !$o->{no_recommends}; $o->ask_from_({ title => N("Type of install"), - message =>N("You have not selected any group of packages. + message => N("You have not selected any group of packages. Please choose the minimal installation you want:"), - interactive_help_id => 'choosePackages#minimal-install' + interactive_help_id => 'minimal-install' }, [ { val => \$o->{rpmsrate_flags_chosen}{CAT_X}, type => 'bool', text => N("With X"), disabled => sub { $minimal } }, + { val => \$recommends, type => 'bool', text => N("Install recommended packages"), disabled => sub { $minimal } }, { val => \$docs, type => 'bool', text => N("With basic documentation (recommended!)"), disabled => sub { $minimal } }, { val => \$minimal, type => 'bool', text => N("Truly minimal install (especially no urpmi)") }, ], - ) or return &chooseGroups; + ) or return 0; if ($minimal) { - $o->{rpmsrate_flags_chosen}{CAT_X} = $docs = 0; + $o->{rpmsrate_flags_chosen}{CAT_X} = $docs = $recommends = 0; $o->{rpmsrate_flags_chosen}{CAT_SYSTEM} = 0; } $o->{excludedocs} = !$docs; $o->{rpmsrate_flags_chosen}{CAT_MINIMAL_DOCS} = $docs; + $o->{no_recommends} = !$recommends; + $o->{compssListLevel} = pkgs::rpmsrate_rate_max() if !$recommends; + log::l("install settings: no_recommends=$o->{no_recommends}, excludedocs=$o->{excludedocs}, really_minimal_install=$minimal"); install::any::unselectMostPackages($o); - } - 1; + 1; } sub reallyChooseGroups { @@ -604,7 +607,7 @@ sub reallyChooseGroups { my ($path, $all); $o->ask_from_({ messages => N("Package Group Selection"), - interactive_help_id => 'choosePackages', + interactive_help_id => 'choosePackageGroups', }, [ { val => \$size_text, type => 'label' }, {}, (map { @@ -629,9 +632,15 @@ sub reallyChooseGroups { 1; } +sub beforeInstallPackages { + my ($o) = @_; + my $_w = $o->{isUpgrade} && $o->wait_message('', N("Preparing upgrade...")); + $o->SUPER::beforeInstallPackages; +} + #------------------------------------------------------------------------------ sub installPackages { - my ($o, $packages) = @_; + my ($o) = @_; my ($current, $total) = (0, 0); my ($_w, $wait_message) = $o->wait_message_with_progress_bar(N("Installing")); @@ -649,7 +658,7 @@ sub installPackages { }; my $install_result; - catch_cdie { $install_result = $o->install::steps::installPackages($packages, 'interactive') } + catch_cdie { $install_result = $o->install::steps::installPackages('interactive') } sub { installPackages__handle_error($o, $_[0]) }; if ($install::pkgs::cancel_install) { @@ -721,7 +730,7 @@ sub configureNetwork { #------------------------------------------------------------------------------ sub installUpdates { my ($o) = @_; - my $u = $o->{updates} ||= {}; + $o->{updates} ||= {}; $o->hasNetwork or return; @@ -732,6 +741,56 @@ sub installUpdates { } $o->ask_yesorno_({ title => N("Updates"), messages => formatAlaTeX( +N("You now have the opportunity to setup online media.") . "\n\n" . +N("This allows to install security updates.") . "\n\n" . +N("To setup those media, you will need to have a working Internet +connection. + +Do you want to setup the update media?")), + interactive_help_id => 'installUpdates', + }, 1) or do { + log::l("installUpdates: skipping since user say no to media setup"); + return; + }; + + my $urpmi_options = { mirror_url => '$MIRRORLIST', downloader => $o->{options}{downloader} }; + + try_again: + #- bring all interface up for installing updates packages. + install::interactive::upNetwork($o); + + any::ask_mirror_and_downloader($o, $urpmi_options); + + if (!any::urpmi_set_downloader($o, $o->{packages}, $urpmi_options->{downloader})) { + log::l("installUpdates: failed to change urpmi downloader"); + local $::isWizard = 0; # make button names "ok" and "cancel", not "next" and "previous" + if ($o->ask_okcancel(N("Warning"), + N("That downloader could not be installed") . "\n" . N("Retry?"))) { + goto try_again; + } else { + return 0; + } + } + + if ($urpmi_options->{mirror_url} ne '$MIRRORLIST') { + $urpmi_options->{mirror_url} = any::ask_mirror($o, 'distrib', $urpmi_options->{mirror_url}); + } + + install::pkgs::clean_rpmdb_shared_regions(); + if (any::urpmi_add_all_media($o, $o->{previous_release}, $urpmi_options->{mirror_url})) { + log::l("installUpdates: successfully added media"); + } else { + log::l("installUpdates: failed to add media"); + local $::isWizard = 0; # make button names "ok" and "cancel", not "next" and "previous" + if ($o->ask_okcancel(N("Warning"), + N("Failure when adding medium") . "\n" . N("Retry?"))) { + goto try_again; + } else { + return 0; + } + } + + $o->ask_yesorno_({ title => N("Updates"), messages => formatAlaTeX( N("You now have the opportunity to download updated packages. These packages have been updated after the distribution was released. They may contain security or bug fixes. @@ -741,19 +800,18 @@ connection. Do you want to install the updates?")), interactive_help_id => 'installUpdates', - }, 1) or return; + }, 1) or do { + log::l("installUpdates: skipping since user say no to updates"); + return; + }; - #- bring all interface up for installing updates packages. - install::interactive::upNetwork($o); + my $binary = find { whereis_binary($_, $::prefix) } if_(check_for_xserver(), 'gurpmi2'), 'urpmi' or return; + my $log_file = '/root/drakx/updates.log'; + run_program::raw({ root => $::prefix, timeout => 'never' }, $binary, '>>', $log_file, '2>>', $log_file, '--auto-select'); install::pkgs::clean_rpmdb_shared_regions(); - if (any::urpmi_add_all_media($o, $o->{previous_release})) { - my $binary = find { whereis_binary($_, $::prefix) } 'gurpmi2', 'urpmi' or return; - run_program::rooted($::prefix, $binary, '--auto-select', '--update'); - } - install::pkgs::clean_rpmdb_shared_regions(); - #- not downing network, even ppp. We don't care much since it is the end of install :) + #- not downing network, even PPP. We don't care much since it is the end of install :) } @@ -828,22 +886,25 @@ sub summary { $o->pkg_install(map { $_->name } @pkgs) if @pkgs; lang::write_and_install($o->{locale}, $o->do_pkgs); - if (!$timezone_manually_set) { + if (!$timezone_manually_set && !$o->{isUpgrade}) { delete $o->{timezone}; install::any::preConfigureTimezone($o); #- now we can precise the timezone thanks to the country } }, }; + local $o->{bootloader}{boot} = 'ESP' if is_uefi(); push @l, { group => N("System"), label => N("Bootloader"), val => sub { - #-PO: example: lilo-graphic on /dev/hda1 - $o->{bootloader}{boot} ? N("%s on %s", $o->{bootloader}{method}, $o->{bootloader}{boot}) : N("None"); + + $o->{bootloader}{boot} ? + #-PO: example: grub2-graphic on /dev/sda1 + N("%s on %s", $o->{bootloader}{method}, $o->{bootloader}{boot}) : N("None"); }, + if_(is_uefi(), tip => N("EFI System Partition")), clicked => sub { any::setupBootloader($o, $o->{bootloader}, $o->{all_hds}, $o->{fstab}, $o->{security}) or return; - any::installBootloader($o, $o->{bootloader}, $o->{all_hds}); }, } if !$::local_install; @@ -852,6 +913,9 @@ sub summary { label => N("User management"), clicked => sub { if (my $u = any::ask_user($o, $o->{users}, $o->{security}, needauser => 1)) { + #- getpwnam, getgrnam, getgrid works + symlinkf("$::prefix/etc/passwd", '/etc/passwd'); + symlinkf("$::prefix/etc/group", '/etc/group'); any::add_users([$u], $o->{authentication}); } }, @@ -863,7 +927,7 @@ sub summary { val => sub { require services; my ($l, $activated) = services::services(); - N("Services: %d activated for %d registered", int(@$activated), int(@$l)); + N("%d activated for %d registered", int(@$activated), int(@$l)); }, clicked => sub { require services; @@ -876,17 +940,17 @@ sub summary { label => N("Keyboard"), val => sub { $o->{keyboard} && translate(keyboard::keyboard2text($o->{keyboard})) }, clicked => sub { $o->selectKeyboard(1) }, - }; + } if !$o->{match_all_hardware}; push @l, { group => N("Hardware"), label => N("Mouse"), val => sub { translate($o->{mouse}{type}) . ' ' . translate($o->{mouse}{name}) }, clicked => sub { selectMouse($o, 1); mouse::write($o->do_pkgs, $o->{mouse}) }, - }; + } if !$o->{match_all_hardware}; - my @sound_cards = detect_devices::getSoundDevices(); + my @sound_cards = $o->{match_all_hardware} ? () : detect_devices::getSoundDevices(); my $sound_index = 0; foreach my $device (@sound_cards) { @@ -905,40 +969,23 @@ sub summary { $sound_index++; } - if (!@sound_cards && ($o->{rpmsrate_flags_chosen}{CAT_GAMES} || $o->{rpmsrate_flags_chosen}{CAT_AUDIO})) { - #- if no sound card are detected AND the user selected things needing a sound card, - #- propose a special case for ISA cards - push @l, { - group => N("Hardware"), - label => N("Sound card"), - val => sub {}, - clicked => sub { - if ($o->ask_yesorno('', N("Do you have an ISA sound card?"))) { - $o->do_pkgs->install(qw(alsa-utils sndconfig aoss)); - $o->ask_warn('', N("Run \"alsaconf\" or \"sndconfig\" after installation to configure your sound card")); - } else { - $o->ask_warn('', N("No sound card detected. Try \"harddrake\" after installation")); - } - }, - }; - } - push @l, { group => N("Hardware"), label => N("Graphical interface"), val => sub { $o->{raw_X} ? Xconfig::various::to_string($o->{raw_X}) : '' }, clicked => sub { configureX($o, 'expert') }, - }; + } if !$o->{match_all_hardware}; push @l, { group => N("Network & Internet"), label => N("Network"), val => sub { $o->{net}{type} }, + format => sub { $_[0] =~ s/.*:://; $_[0] }, clicked => sub { require network::netconnect; network::netconnect::real_main($o->{net}, $o, $o->{modules_conf}); }, - }; + } if !$o->{match_all_hardware}; $o->{miscellaneous} ||= {}; push @l, { @@ -950,7 +997,7 @@ sub summary { network::network::miscellaneous_choose($o, $o->{miscellaneous}); network::network::proxy_configure($o->{miscellaneous}) if !$::testing; }, - }; + } if !$o->{match_all_hardware}; push @l, { group => N("Security"), @@ -969,7 +1016,8 @@ sub summary { install::any::set_security($o); } }, - }; + } if -x "$::prefix/usr/sbin/msec"; + # FIXME: install msec if needed instead push @l, { group => N("Security"), @@ -988,6 +1036,7 @@ sub summary { } if detect_devices::get_net_interfaces(); my $check_complete = sub { + return 1 if $o->{match_all_hardware}; require install::pkgs; my $p = install::pkgs::packageByName($o->{packages}, 'task-x11'); $o->{raw_X} || !$::testing && $p && !$p->flag_installed || @@ -996,6 +1045,7 @@ sub summary { $o->summary_prompt(\@l, $check_complete); + any::installBootloader($o, $o->{bootloader}, $o->{all_hds}) if !$::local_install; install::steps::configureTimezone($o) if !$timezone_manually_set; #- do not forget it. } @@ -1019,7 +1069,9 @@ sub setRootPassword_addUser { sub setupBootloaderBefore { my ($o) = @_; local $o->{pop_wait_messages} = 1; - my $_w = $o->wait_message(N("Preparing bootloader..."), N("Preparing bootloader...") . "\n" . + my $_w = $o->wait_message(N("Please wait"), + #-PO: This is NOT the boot loader (just the kernel initrds)!!!! + N("Preparing initial startup program...") . "\n" . N("Be patient, this may take a while...") ); $o->SUPER::setupBootloaderBefore; @@ -1028,17 +1080,8 @@ sub setupBootloaderBefore { #------------------------------------------------------------------------------ sub setupBootloader { my ($o) = @_; - if (arch() =~ /ppc/) { - if (detect_devices::get_mac_generation() !~ /NewWorld/ && - detect_devices::get_mac_model() !~ /IBM/) { - $o->ask_warn('', N("You appear to have an OldWorld or Unknown machine, the yaboot bootloader will not work for you. The install will continue, but you'll need to use BootX or some other means to boot your machine. The kernel argument for the root fs is: root=%s", '/dev/' . fs::get::root_($o->{fstab})->{device})); - log::l("OldWorld or Unknown Machine - no yaboot setup"); - return; - } - } { any::setupBootloader_simple($o, $o->{bootloader}, $o->{all_hds}, $o->{fstab}, $o->{security}) or return; - any::installBootloader($o, $o->{bootloader}, $o->{all_hds}) or die "already displayed"; } } |
