diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-08-31 09:11:21 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-08-31 09:11:21 +0000 |
commit | 306fcb94a5cd33c20630912327ff7230357f1c6c (patch) | |
tree | ced76243cc016c5dc46c2a4d0209e55781f989c9 /perl-install/install/steps_interactive.pm | |
parent | 60bea8a37fb6ed08f44db775dda0149ba5fae0be (diff) | |
download | drakx-306fcb94a5cd33c20630912327ff7230357f1c6c.tar drakx-306fcb94a5cd33c20630912327ff7230357f1c6c.tar.gz drakx-306fcb94a5cd33c20630912327ff7230357f1c6c.tar.bz2 drakx-306fcb94a5cd33c20630912327ff7230357f1c6c.tar.xz drakx-306fcb94a5cd33c20630912327ff7230357f1c6c.zip |
- add new step "choose desktop", before or hiding "choose groups"
(as required in the specs of 2008.0)
Diffstat (limited to 'perl-install/install/steps_interactive.pm')
-rw-r--r-- | perl-install/install/steps_interactive.pm | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/perl-install/install/steps_interactive.pm b/perl-install/install/steps_interactive.pm index 33e2c3b30..f7323c2e7 100644 --- a/perl-install/install/steps_interactive.pm +++ b/perl-install/install/steps_interactive.pm @@ -339,7 +339,6 @@ sub choosePackages { my $w = $o->wait_message('', N("Looking for available packages...")); my $availableC = &install::steps::choosePackages; - my $individual; require install::pkgs; @@ -354,9 +353,12 @@ sub choosePackages { } my $min_mark = 4; + my ($individual, $chooseGroups); + + _chooseDesktop($o, $o->{rpmsrate_flags_chosen}, \$chooseGroups) if !$o->{upgrade}; chooseGroups: - $o->chooseGroups($o->{packages}, $o->{compssUsers}, $min_mark, \$individual) if !$o->{isUpgrade}; + $o->chooseGroups($o->{packages}, $o->{compssUsers}, $min_mark, \$individual) if $chooseGroups; ($o->{packages_}{ind}) = install::pkgs::setSelectedFromCompssList($o->{packages}, $o->{rpmsrate_flags_chosen}, $min_mark, $availableC); @@ -404,6 +406,30 @@ 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 = ( + N_("Install Mandriva KDE Desktop"), + N_("Install Mandriva GNOME Desktop"), + N_("Custom install"), + ); + + my $choice; + $o->ask_from_({}, [ + { val => \$choice, list => \@l, type => 'list', format => \&translate }, + ]); + log::l("chosen Desktop: $choice"); + if (my ($desktop) = $choice =~ /(KDE|GNOME)/) { + my ($want, $dontwant) = ($desktop, grep { $desktop ne $_ } 'KDE', 'GNOME'); + $rpmsrate_flags_chosen->{"CAT_$want"} = 1; + $rpmsrate_flags_chosen->{"CAT_$dontwant"} = 0; + my @flags = map_each { if_($::b, $::a) } %$rpmsrate_flags_chosen; + log::l("flags ", join(' ', sort @flags)); + } else { + $$chooseGroups = 1; + } +} sub chooseGroups { my ($o, $packages, $compssUsers, $min_level, $individual) = @_; |