diff options
Diffstat (limited to 'perl-install/install')
-rw-r--r-- | perl-install/install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/install/pkgs.pm | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index a60c06af3..52fc570a7 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,5 +1,7 @@ - fix lock icon - show again package descriptions in individual package list (mga#549) +- unselect already suggested packages when performing a minimal install if "no + suggests" option was choosen (mga#5209) Version 14.5 - 12 April 2012 diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm index a63622c90..9420f0cea 100644 --- a/perl-install/install/pkgs.pm +++ b/perl-install/install/pkgs.pm @@ -273,11 +273,13 @@ sub select_by_package_names_or_die { } } +my @suggested_package_ids; sub _resolve_requested_and_check { my ($packages, $state, $requested) = @_; my @l = $packages->resolve_requested($packages->{rpmdb}, $state, $requested, callback_choices => \&packageCallbackChoices, no_suggests => $::o->{no_suggests}); + @suggested_package_ids = uniq(@suggested_package_ids, map { $packages->{depslist}[$_]->id } grep { $state->{selected}{$_}{suggested} } keys $state->{selected}); my $error; if (find { !exists $state->{selected}{$_} } keys %$requested) { @@ -329,7 +331,10 @@ sub unselectAllPackages { my %keep_selected; log::l("unselecting all packages..."); foreach (@{$packages->{depslist}}) { + log::l("will unselect suggested " . $_->name) if member($_->id, @suggested_package_ids); my $to_select = $_->flag_base || $_->flag_installed && $_->flag_selected; + # unselect suggested packages if minimal install: + undef $to_select if $::o->{no_suggests} && member($_->id, @suggested_package_ids); if ($to_select) { #- keep track of packages that should be kept selected. $keep_selected{$_->id} = $_; |