From dcaffff668e66be0958f276f2b3f141c503caa9a Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 3 Mar 2005 15:41:24 +0000 Subject: Add a progress bar when copying rpms from the media to the hard disk --- perl-install/install_steps_gtk.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perl-install/install_steps_gtk.pm') diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 6c9fe0e66..6cdd6136e 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -653,10 +653,10 @@ sub deselectFoundMedia { $cdlist{$1} ||= []; push @{$cdlist{$1}}, $i; } - $mediumsize->{$_->[0]} == 0 and $totalsize = -1; #- don't check size, total medium size unknown $totalsize >= 0 and $totalsize += $mediumsize->{$_->[0]}; ++$i; } + $totalsize or $totalsize = -1; #- don't check size, total medium size unknown my @selection = (1) x @hdlist2; my $copy_rpms_on_disk = 0; my $ask_copy_rpms_on_disk = $o->{method} !~ /iso/i; @@ -664,7 +664,6 @@ sub deselectFoundMedia { if ($ask_copy_rpms_on_disk && $totalsize >= 0) { my (undef, $availvar) = install_any::getAvailableSpace_mounted('/var'); $availvar /= 1024; #- Mo - log::l("rpms totalsize=$totalsize"); $ask_copy_rpms_on_disk = $totalsize > $availvar * 0.6; } if ($ask_copy_rpms_on_disk) { @@ -700,6 +699,7 @@ It will then continue from the hard drive and the packages will remain available push @l2, $hdlists->[$_] foreach @{$corresp[$i]}; } log::l("keeping media " . join ',', map { $_->[1] } @l2); + $o->{mediumsize} = $totalsize; (\@l2, $copy_rpms_on_disk); } -- cgit v1.2.1