diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-01-31 11:46:01 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-01-31 11:46:01 +0000 |
commit | 093a6d2286a6b99ca692330c29eef0be235e762d (patch) | |
tree | 986c88c61045bd9319e70cd8465534d5ab0f53a6 | |
parent | 8ffe721096c64de422245ad1952b6c2eb7ed7c46 (diff) | |
download | drakx-backup-do-not-use-093a6d2286a6b99ca692330c29eef0be235e762d.tar drakx-backup-do-not-use-093a6d2286a6b99ca692330c29eef0be235e762d.tar.gz drakx-backup-do-not-use-093a6d2286a6b99ca692330c29eef0be235e762d.tar.bz2 drakx-backup-do-not-use-093a6d2286a6b99ca692330c29eef0be235e762d.tar.xz drakx-backup-do-not-use-093a6d2286a6b99ca692330c29eef0be235e762d.zip |
(choosePackagesTree): created, simple ask_many_from_list to choose
individual packages
(choosePackages): log for debug
(choosePackages): don't ask to install in beginner. Max is chosen
(setRootPassword): help not based on installClass being server or not
(selectInstallClass): remove installClass choice (was normal/devel/server)
(chooseGroups): fix for individual package selection flag
-rw-r--r-- | perl-install/install_steps_interactive.pm | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index eb16e2565..3009893d3 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -201,22 +201,6 @@ sub selectInstallClass { $o->{isUpgrade} = $o->selectInstallClass1($verifInstallClass, first(list2kv(@c)), ${{reverse %c}}{$::expert ? "expert" : "beginner"}, [ __("Install"), __("Update") ], $o->{isUpgrade} ? "Update" : "Install") eq "Update"; - - if ($::corporate || !$::expert) { - delete $o->{installClass}; - } else { - my %c = ( - normal => _("Workstation"), - developer => _("Development"), - server => _("Server"), - ); - $o->set_help('selectInstallClass2'); - $o->{installClass} = $o->ask_from_listf(_("Install Class"), - _("What is your system used for?"), - sub { $c{$_[0]} }, - [ keys %c ], - $o->{installClass}); - } install_steps::selectInstallClass($o); } @@ -432,7 +416,7 @@ sub choosePackages { my $max_size = pkgs::selectedSize($packages) + 1; #- avoid division by zero. pkgs::restoreSelected($b); - $o->chooseGroups($packages, $compssUsers, $min_mark, \$individual, $max_size) if $::expert && !$::corporate; + $o->chooseGroups($packages, $compssUsers, $min_mark, \$individual, $max_size) if !$::corporate; my $size2install = min($availableC, do { my $max = round_up(min($max_size, $availableC) / sqr(1024), 100); @@ -455,8 +439,9 @@ sub choosePackages { $l[1] > $l[0] + 100 or splice(@l, 0, 1); } $o->set_help('empty'); - $o->ask_from_listf('', _("Select the size you want to install"), - sub { _ ($text[$_[0]], $_[0]) }, \@l, $l[1]) * sqr(1024); +# $o->ask_from_listf('', _("Select the size you want to install"), +# sub { _ ($text[$_[0]], $_[0]) }, \@l, $l[1]) * sqr(1024); + $max * sqr(1024); } } else { $o->chooseSizeToInstall($packages, $min_size, $def_size, $max_size, $availableC, $individual) || goto &choosePackages; @@ -466,6 +451,9 @@ sub choosePackages { $o->chooseGroups($packages, $compssUsers, $min_mark) or goto &choosePackages; $size2install = $availableC; } + + log::l("compssUsersChoice's: ", join(" ", grep { $o->{compssUsersChoice}{$_} } keys %{$o->{compssUsersChoice}})); + ($o->{packages_}{ind}) = pkgs::setSelectedFromCompssList($packages, $o->{compssUsersChoice}, $min_mark, $size2install); @@ -476,7 +464,19 @@ sub chooseSizeToInstall { my ($o, $packages, $min, $def, $max, $availableC) = @_; min($def, $availableC * 0.7); } -sub choosePackagesTree {} +sub choosePackagesTree { + my ($o, $packages, $compss) = @_; + + $o->ask_many_from_list('', _("Choose the packages you want to install"), + { + list => [ #grep { pkgs::packageMedium($_)->{selected} } + map { pkgs::packageByName($packages, $_) } + keys %{$packages->{names}} ], + value => \&pkgs::packageFlagSelected, + label => \&pkgs::packageName, + sort => 1, + }); +} sub chooseGroups { my ($o, $packages, $compssUsers, $min_level, $individual, $max_size) = @_; @@ -510,7 +510,7 @@ sub chooseGroups { label => sub { translate($_) . ($size{$_} ? sprintf " (%d%s)", $size{$_}, _("MB") : '') }, }, if_($o->{meta_class} eq 'desktop', { list => [ _("All") ], val => sub { \$all }, shadow => 0 }), - if_($individual, { list => [ _("Individual package selection") ], val => sub { \$individual } }), + if_($individual, { list => [ _("Individual package selection") ], val => sub { $individual }, advanced => 1 }), ) or return; if ($all) { $o->{compssUsersChoice}{$_} = 1 foreach map { @{$compssUsers->{$_}} } @{$o->{compssUsersSorted}}; @@ -737,7 +737,7 @@ sub setRootPassword { return if $o->{security} < 1 && !$clicked; $o->set_help("setRootPassword", - if_($o->{installClass} =~ "server" || $::expert, "setRootPasswordMd5"), + if_($::expert, "setRootPasswordMd5"), if_($::expert, "setRootPasswordNIS")); $o->ask_from_entries_refH_powered( |