aboutsummaryrefslogtreecommitdiffstats
path: root/MandrivaUpdate
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-23 06:26:36 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-23 06:26:36 +0000
commit07ba6890e5df70bb2f094f91c227adfd9be39746 (patch)
tree1abeac20f65c169bed4ba819fc3e52bee6ab6cd0 /MandrivaUpdate
parentbcb9a5ddf3ea81ef41c9c45cceacb23407679ea1 (diff)
downloadrpmdrake-07ba6890e5df70bb2f094f91c227adfd9be39746.tar
rpmdrake-07ba6890e5df70bb2f094f91c227adfd9be39746.tar.gz
rpmdrake-07ba6890e5df70bb2f094f91c227adfd9be39746.tar.bz2
rpmdrake-07ba6890e5df70bb2f094f91c227adfd9be39746.tar.xz
rpmdrake-07ba6890e5df70bb2f094f91c227adfd9be39746.zip
(refresh_packages_list) do not crash if selectable package list is empty
Diffstat (limited to 'MandrivaUpdate')
-rwxr-xr-xMandrivaUpdate3
1 files changed, 2 insertions, 1 deletions
diff --git a/MandrivaUpdate b/MandrivaUpdate
index 69676e72..d3106643 100755
--- a/MandrivaUpdate
+++ b/MandrivaUpdate
@@ -62,7 +62,8 @@ sub refresh_packages_list {
# don't select kernel*-latest by default and the kernels they require:
if (!$initialized) {
$pkgs->{$_}{selected} = 0 foreach @requested;
- toggle($list, grep { !$pkgs->{$_}{pkg}->flag_skip } @requested);
+ my @selectable = grep { !$pkgs->{$_}{pkg}->flag_skip } @requested;
+ toggle($list, @selectable) if @selectable;
$initialized = 1;
}