diff options
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r-- | perl-install/install_steps_gtk.pm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 4c54164fa..36842d559 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -659,11 +659,17 @@ sub deselectFoundMedia { } my @selection = (1) x @hdlist2; my $copy_rpms_on_disk = 0; + my $ask_copy_rpms_on_disk = $o->{method} !~ /-iso$/; #- check available size for copying rpms from infos in hdlists file - if ($totalsize >= 0) { - # TODO my $availvar = install_any::getAvailableSpace_mounted('/var'); + 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 ($o->{method} !~ /-iso$/) { + if ($ask_copy_rpms_on_disk) { + #- don't be afraid, cleanup old RPMs if upgrade + rm_rf("$::prefix/var/ftp/pub/Mandrakelinux") if $o->{isUpgrade}; my $w = ugtk2->new(""); $i = -1; $w->sync; |