diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-02-22 13:13:22 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-02-22 13:13:22 +0000 |
commit | 02081920cdd5d13ab0a8baedd20ebff70dba6343 (patch) | |
tree | e8e9c8aca525c8692b7f95d3353c48d3e323292b /perl-install/install_steps_gtk.pm | |
parent | 0685a763fd5ac6d18ff61540597108342d609324 (diff) | |
download | drakx-backup-do-not-use-02081920cdd5d13ab0a8baedd20ebff70dba6343.tar drakx-backup-do-not-use-02081920cdd5d13ab0a8baedd20ebff70dba6343.tar.gz drakx-backup-do-not-use-02081920cdd5d13ab0a8baedd20ebff70dba6343.tar.bz2 drakx-backup-do-not-use-02081920cdd5d13ab0a8baedd20ebff70dba6343.tar.xz drakx-backup-do-not-use-02081920cdd5d13ab0a8baedd20ebff70dba6343.zip |
Verify free space on disk for copying rpms
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; |