summaryrefslogtreecommitdiffstats
path: root/perl-install/install/steps_interactive.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install/steps_interactive.pm')
-rw-r--r--perl-install/install/steps_interactive.pm176
1 files changed, 90 insertions, 86 deletions
diff --git a/perl-install/install/steps_interactive.pm b/perl-install/install/steps_interactive.pm
index 1bfea5cd0..4dc48acef 100644
--- a/perl-install/install/steps_interactive.pm
+++ b/perl-install/install/steps_interactive.pm
@@ -1,4 +1,4 @@
-package install::steps_interactive; # $Id: steps_interactive.pm 267011 2010-03-19 12:00:12Z pterjan $
+package install::steps_interactive;
use strict;
@@ -36,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) ]);
}
@@ -261,7 +261,7 @@ 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);
@@ -279,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);
}
@@ -415,7 +387,7 @@ sub choosePackages {
my ($individual, $chooseGroups);
if (!$o->{isUpgrade}) {
- my $tasks_ok = install::pkgs::packageByName($o->{packages}, 'task-kde4-minimal') &&
+ my $tasks_ok = install::pkgs::packageByName($o->{packages}, 'task-plasma5-minimal') &&
install::pkgs::packageByName($o->{packages}, 'task-gnome-minimal');
if ($tasks_ok && $availableC >= 2_500_000_000) {
_chooseDesktop($o, $o->{rpmsrate_flags_chosen}, \$chooseGroups);
@@ -480,7 +452,7 @@ sub _chooseDesktop {
my ($o, $rpmsrate_flags_chosen, $chooseGroups) = @_;
my @l = group_by2(
- KDE => N("KDE"),
+ PLASMA5 => N("Plasma"),
GNOME => N("GNOME"),
Custom => N("Custom"),
);
@@ -499,7 +471,7 @@ sub _chooseDesktop {
}
my $desktop = $choice->[0];
log::l("chosen Desktop: $desktop");
- my @desktops = ('KDE', 'GNOME');
+ my @desktops = ('PLASMA5', 'GNOME');
if (member($desktop, @desktops)) {
my ($want, $dontwant) = ($desktop, grep { $desktop ne $_ } @desktops);
$rpmsrate_flags_chosen->{"CAT_$want"} = 1;
@@ -515,6 +487,8 @@ sub _chooseDesktop {
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.
@@ -531,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{@_} = ();
@@ -595,7 +571,7 @@ sub offer_minimal_options {
my ($o) = @_;
my $docs = !$o->{excludedocs};
state $minimal;
- my $suggests = !$o->{no_suggests};
+ my $recommends = !$o->{no_recommends};
$o->ask_from_({ title => N("Type of install"),
message => N("You have not selected any group of packages.
@@ -604,21 +580,21 @@ Please choose the minimal installation you want:"),
},
[
{ val => \$o->{rpmsrate_flags_chosen}{CAT_X}, type => 'bool', text => N("With X"), disabled => sub { $minimal } },
- { val => \$suggests, type => 'bool', text => N("Install suggested packages"), 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 0;
if ($minimal) {
- $o->{rpmsrate_flags_chosen}{CAT_X} = $docs = $suggests = 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_suggests} = !$suggests;
- $o->{compssListLevel} = pkgs::rpmsrate_rate_max() if !$suggests;
- log::l("install settings: no_suggests=$o->{no_suggests}, excludedocs=$o->{excludedocs}, really_minimal_install=$minimal");
+ $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;
@@ -765,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.
@@ -774,20 +800,18 @@ connection.
Do you want to install the updates?")),
interactive_help_id => 'installUpdates',
- }, 1) or return;
-
- #- bring all interface up for installing updates packages.
- install::interactive::upNetwork($o);
+ }, 1) or do {
+ log::l("installUpdates: skipping since user say no to updates");
+ return;
+ };
- install::pkgs::clean_rpmdb_shared_regions();
- if (any::urpmi_add_all_media($o, $o->{previous_release})) {
my $binary = find { whereis_binary($_, $::prefix) } if_(check_for_xserver(), 'gurpmi2'), 'urpmi' or return;
my $log_file = '/root/drakx/updates.log';
- run_program::rooted($::prefix, $binary, '>>', $log_file, '2>>', $log_file, '--auto-select');
- }
+ run_program::raw({ root => $::prefix, timeout => 'never' }, $binary, '>>', $log_file, '2>>', $log_file, '--auto-select');
+
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 :)
}
@@ -862,21 +886,23 @@ 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 {
$o->{bootloader}{boot} ?
- #-PO: example: lilo-graphic on /dev/hda1
+ #-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;
},
@@ -887,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});
}
},
@@ -911,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) {
@@ -940,41 +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 { s/.*:://; $_ },
+ 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, {
@@ -986,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"),
@@ -1025,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 ||
@@ -1057,8 +1069,8 @@ sub setRootPassword_addUser {
sub setupBootloaderBefore {
my ($o) = @_;
local $o->{pop_wait_messages} = 1;
- my $_w = $o->wait_message(N("Preparing bootloader..."),
- #-PO: This is NOT the boot loader!!!!
+ 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...")
);
@@ -1068,14 +1080,6 @@ 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;
}