summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-05-05 12:11:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-05-05 12:11:11 +0000
commit7b7fcfdf7fcb4f7fa9b3a52e2bf81ae93739e512 (patch)
tree4641c9b55a843d9f27ae6152789be326de323c3d /perl-install
parent9d42e52fa720c98850b2c6c58db7b3fe1b17e6dc (diff)
downloaddrakx-7b7fcfdf7fcb4f7fa9b3a52e2bf81ae93739e512.tar
drakx-7b7fcfdf7fcb4f7fa9b3a52e2bf81ae93739e512.tar.gz
drakx-7b7fcfdf7fcb4f7fa9b3a52e2bf81ae93739e512.tar.bz2
drakx-7b7fcfdf7fcb4f7fa9b3a52e2bf81ae93739e512.tar.xz
drakx-7b7fcfdf7fcb4f7fa9b3a52e2bf81ae93739e512.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/fsedit.pm2
-rw-r--r--perl-install/install_steps.pm10
-rw-r--r--perl-install/pkgs.pm8
3 files changed, 14 insertions, 6 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index c0b5b4fa9..ccc198290 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -14,6 +14,7 @@ use Data::Dumper;
use fsedit;
use devices;
use loopback;
+use raid;
use fs;
use log;
@@ -268,6 +269,7 @@ sub check_mntpoint {
};
$check->($fake_part) unless $mntpoint eq '/' && $loopbackDevice; #- '/' is a special case, no loop check
+ die "raid / with no /boot" if $mntpoint eq "/" && raid::is($part) && !has_mntpoint("/boot", $hds);
#- if ($part->{start} + $part->{size} > 1024 * $hd->cylinder_size() && arch() =~ /i386/) {
#- die "/boot ending on cylinder > 1024" if $mntpoint eq "/boot";
#- die "/ ending on cylinder > 1024" if $mntpoint eq "/" && !has_mntpoint("/boot", $hds);
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 21af38d7e..1d31dbefe 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -228,7 +228,7 @@ sub choosePackages {
#- not be able to start (xfs at least).
my $available = install_any::getAvailableSpace($o);
my $availableCorrected = pkgs::invCorrectSize($available / sqr(1024)) * sqr(1024);
- $available < $availableCorrected or $available = $availableCorrected;
+ log::l("available size $available (corrected $availableCorrected)");
foreach (values %{$packages->[0]}) {
pkgs::packageSetFlagSkip($_, 0);
@@ -394,10 +394,16 @@ Consoles 1,3,4,7 may also contain interesting information";
$D .= "/fonts";
-d "$o->{prefix}$D" or next;
log::l("found win font dir $D");
- $hasttf ||= mkdir "$o->{prefix}$dest", 0755;
+ if (!$hasttf) {
+ $hasttf = $o->ask_okcancel('',
+_("Some true type fonts from windows have been found on your computer.
+Do you want to use them? Be sure you have the right to use them under Linux.")) or goto nottf;
+ mkdir "$o->{prefix}$dest", 0755;
+ }
/(.*)\.ttf/i and symlink "$D/$_", "$o->{prefix}$dest/$1.ttf" foreach grep { /\.ttf/i } all("$o->{prefix}$D");
}
}
+ nottf:
if ($hasttf) {
run_program::rooted($o->{prefix}, "ttmkfdir", "-d", $dest, "-o", "$dest/fonts.dir");
run_program::rooted($o->{prefix}, "chkfontpath", "--add", $dest);
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index a41d235cd..8c4761872 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -172,8 +172,8 @@ sub extractHeaders($$$) {
my $A = -1.922e-05;
my $B = 1.18411;
my $C = 33.2;
-sub correctSize { ($A * $_[0] + $B) * $_[0] + $C } #- size correction in MB.
-sub invCorrectSize { (sqrt(sqr($B) + 4 * $A * ($_[0] - $C)) - $B) / 2 / $A }
+sub correctSize { max($_[0], ($A * $_[0] + $B) * $_[0] + $C) } #- size correction in MB.
+sub invCorrectSize { min($_[0], (sqrt(sqr($B) + 4 * $A * ($_[0] - $C)) - $B) / 2 / $A) } #- size correction in MB.
sub selectedSize {
my ($packages) = @_;
@@ -604,7 +604,6 @@ sub readCompssUsers {
#- }
sub setSelectedFromCompssList {
- log::l("setSelectedFromCompssList");
my ($compssListLevels, $packages, $min_level, $max_size, $install_class) = @_;
my $ind = $compssListLevels->{$install_class}; defined $ind or log::l("unknown install class $install_class in compssList"), return;
my $nb = selectedSize($packages);
@@ -630,13 +629,13 @@ sub setSelectedFromCompssList {
}
if ($max_size && $nb > $max_size) {
$min_level = $p->{values}[$ind];
- log::l("setSelectedFromCompssList: up to indice $min_level (reached size $nb)");
last;
}
#- at this point the package can safely be selected.
selectPackage($packages, $p);
}
+ log::l("setSelectedFromCompssList: reached size $nb, up to indice $min_level (less than $max_size)");
$ind, $min_level;
}
@@ -891,6 +890,7 @@ sub install($$$;$$) {
#- one or many transaction.
my ($total, $nb);
foreach my $pkg (@$toInstall) {
+ print packageName($pkg), "\n";
$packages{packageName($pkg)} = $pkg;
$nb++;
$total += packageSize($pkg);