summaryrefslogtreecommitdiffstats
path: root/perl-install/sbus_probing
Commit message (Expand)AuthorAgeFilesLines
* move to MDK::Common, bool->to_boolPascal Rigaux2001-07-241-1/+1
* no_commentPascal Rigaux2000-09-141-1/+1
* no_commentPascal Rigaux2000-08-281-0/+1
* no_commentPascal Rigaux2000-08-281-1/+1
* no_commentPascal Rigaux2000-07-231-26/+2
* *** empty log message ***Francois Pons2000-06-201-8/+10
* *** empty log message ***Francois Pons2000-06-071-0/+3
* no_commentPascal Rigaux2000-06-031-1/+1
* *** empty log message ***Francois Pons2000-05-291-0/+156
h'>
-rw-r--r--perl-install/install/pkgs.pm7
2 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 8332e0c39..6f2ea446e 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,4 @@
+- fix a crash when package state is empty (mga#5487)
- when selecting where ro install bootloader, display mountpoint if
available, and size+fs_type if we have nothing (mga#5460)
diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm
index 77aaebf9c..266c0a5b9 100644
--- a/perl-install/install/pkgs.pm
+++ b/perl-install/install/pkgs.pm
@@ -279,8 +279,11 @@ sub _resolve_requested_and_check {
my @l = $packages->resolve_requested($packages->{rpmdb}, $state, $requested,
callback_choices => \&packageCallbackChoices, no_suggests => $::o->{no_suggests});
- my @new_ids = map { $packages->{depslist}[$_]->id } grep { $state->{selected}{$_}{suggested} } keys $state->{selected};
- @suggested_package_ids = uniq(@suggested_package_ids, @new_ids);
+
+ if (!is_empty_hash_ref($state->{selected})) {
+ my @new_ids = map { $packages->{depslist}[$_]->id } grep { $state->{selected}{$_}{suggested} } keys $state->{selected};
+ @suggested_package_ids = uniq(@suggested_package_ids, @new_ids);
+ }
my $error;
if (find { !exists $state->{selected}{$_} } keys %$requested) {