From 9656115fcb9760586ccd53bdd9cf354a378c62de Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 22 Jul 2002 14:23:24 +0000 Subject: try avoiding infinite loop. --- perl-install/pkgs.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'perl-install/pkgs.pm') diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 21877e2d3..3a86713f4 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -817,7 +817,15 @@ sub installTransactionClosure { #- search first usable medium (sorted by medium ordering). foreach (sort { $a->{start} <=> $b->{start} } values %{$packages->{mediums}}) { - $_->{selected} or next; + unless ($_->{selected}) { + #- this medium is not selected, but we have to make sure no package are left + #- in $id2pkg. + foreach ($_->{start} .. $_->{end}) { + delete $id2pkg->{$_}; + } + #- anyway, examine the next one. + next; + } if ($l[0] <= $_->{end}) { #- we have a candidate medium, it could be the right one containing #- the first package of @l... -- cgit v1.2.1