From bbe401b766272753bd1d25942322fc3928132020 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 5 May 2000 07:33:30 +0000 Subject: no_comment --- perl-install/ChangeLog | 7 +++++++ perl-install/Xconfig.pm | 1 + perl-install/Xconfigurator.pm | 2 +- perl-install/fsedit.pm | 3 ++- perl-install/install2.pm | 2 +- perl-install/install_any.pm | 18 +++++++++++++++--- perl-install/install_steps.pm | 9 ++------- perl-install/install_steps_interactive.pm | 3 ++- perl-install/pkgs.pm | 13 +++++++------ perl-install/share/compssList | 4 ++++ perl-install/share/compssUsers | 3 +++ 11 files changed, 45 insertions(+), 20 deletions(-) diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index 0a26b3797..aed10f757 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,3 +1,10 @@ +2000-05-05 Pixel + + * pkgs.pm (correctSize): updated for 7.1 + + * install_any.pm (getAvailableSpace): move the removing of + $minAvailableSize here. + 2000-05-04 Pixel * install2.pm (configurePrinter): give clicked to printerConfig diff --git a/perl-install/Xconfig.pm b/perl-install/Xconfig.pm index d87e32d88..925c836e0 100644 --- a/perl-install/Xconfig.pm +++ b/perl-install/Xconfig.pm @@ -120,6 +120,7 @@ sub getinfoFromDDC { $? == 0 or return $o; $o->{card}{memory} ||= to_int($m); + local $_; while (($_ = shift @l) ne "\n") { my ($depth, $x, $y) = split; $depth = int(log($depth) / log(2)); diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index ce37bdacf..3f7d6e00b 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -223,7 +223,7 @@ sub monitorConfiguration(;$$) { if ($useFB) { #- use smallest values for monitor configuration since FB is used, #- BIOS initialize graphics, current X server will not refuse that. - $monitor->{hsyncrange} ||= $hsyncranges[0]; + $monitor->{hsyncrange} ||= $hsyncranges[1]; $monitor->{vsyncrange} ||= $vsyncranges[0]; add2hash($monitor, { type => "Unknown", vendor => "Unknown", model => "Unknown" }); } else { diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index 2c5e90aa2..844762905 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -177,6 +177,7 @@ sub suggest_part($$$;$) { my ($hd, $part, $hds, $suggestions) = @_; $suggestions ||= \@suggestions; + my $has_swap = grep { isSwap($_) } get_fstab(@$hds); my ($best, $second) = @@ -184,7 +185,7 @@ sub suggest_part($$$;$) { grep { $_->{size} <= ($part->{maxsize} || $part->{size}) } grep { !has_mntpoint($_->{mntpoint}, $hds) || isSwap($_) && !$has_swap } grep { !$_->{hd} || $_->{hd} eq $hd->{device} } - grep { !$part->{type} || $part->{type} == $_->{type} } + grep { !$part->{type} || $part->{type} == $_->{type} || isTrueFS($part->{type}) && isTrueFS($_->{type}) } @$suggestions or return; #- if (arch() =~ /^i386/) { diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 37b0f75d2..cd3d7c464 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -436,7 +436,7 @@ sub configureTimezone { #------------------------------------------------------------------------------ sub configureServices { $::expert and $o->servicesConfig } #------------------------------------------------------------------------------ -sub configurePrinter { $o->printerConfig } +sub configurePrinter { $o->printerConfig($_[0]) } #------------------------------------------------------------------------------ sub setRootPassword { return if $o->{isUpgrade}; diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index a9696327a..cff5446ab 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -227,13 +227,25 @@ sub shells($) { sub getAvailableSpace { my ($o) = @_; - do { $_->{mntpoint} eq '/usr' and return int($_->{size} * 512 / 1.07) } foreach @{$o->{fstab}}; - do { $_->{mntpoint} eq '/' and return int($_->{size} * 512 / 1.07) } foreach @{$o->{fstab}}; + #- make sure of this place to be available for installation, this could help a lot. + #- currently doing a very small install use 36Mb of postinstall-rpm, but installing + #- these packages may eat up to 90Mb (of course not all the server may be installed!). + #- 50mb may be a good choice to avoid almost all problem of insuficient space left... + my $minAvailableSize = 50 * sqr(1024); + + int getAvailableSpace_raw($o->{fstab}) * 512 / 1.07 - $minAvailableSize; +} + +sub getAvailableSpace_raw { + my ($fstab) = @_; + + do { $_->{mntpoint} eq '/usr' and return $_->{size} } foreach @$fstab; + do { $_->{mntpoint} eq '/' and return $_->{size} } foreach @$fstab; if ($::testing) { my $nb = 650; log::l("taking ${nb}MB for testing"); - return $nb << 20; + return $nb << 11; } die "missing root partition"; } diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 06b486091..503e30bf0 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -2,7 +2,7 @@ package install_steps; use diagnostics; use strict; -use vars qw($minAvailableSize @filesToSaveForUpgrade); +use vars qw(@filesToSaveForUpgrade); #-###################################################################################### #- misc imports @@ -24,11 +24,6 @@ use network; use any; use fs; -#- make sure of this place to be available for installation, this could help a lot. -#- currently doing a very small install use 36Mb of postinstall-rpm, but installing -#- these packages may eat up to 90Mb (of course not all the server may be installed!). -#- 50mb may be a good choice to avoid almost all problem of insuficient space left... -$minAvailableSize = 50 * sqr(1024); @filesToSaveForUpgrade = qw( /etc/ld.so.conf /etc/fstab /etc/hosts /etc/conf.modules ); @@ -231,7 +226,7 @@ sub choosePackages { #- make sure we kept some space left for available else the system may #- not be able to start (xfs at least). - my $available = install_any::getAvailableSpace($o) - $minAvailableSize; + my $available = install_any::getAvailableSpace($o); my $availableCorrected = pkgs::invCorrectSize($available / sqr(1024)) * sqr(1024); $available < $availableCorrected or $available = $availableCorrected; diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 2e6df5371..1e52a1147 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -666,12 +666,13 @@ _("Use NIS") => { val => \$nis, type => 'bool', text => _("yellow pages") }, } ) or return; + $o->{authentication}{NIS} &&= $nis; $o->ask_from_entries_ref('', _("Authentification NIS"), [ _("NIS Domain"), _("NIS Server") ], [ \ ($o->{netc}{NISDOMAIN} ||= $o->{netc}{DOMAINNAME}), { val => \$o->{authentication}{NIS}, list => ["broadcast"] }, - ]) if $nis; + ]) if $nis; install_steps::setRootPassword($o); } diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index b592f140a..a41d235cd 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -169,10 +169,11 @@ sub extractHeaders($$$) { } #- size and correction size functions for packages. -my $A = 20471; -my $B = 16258; -sub correctSize { ($A - $_[0]) * $_[0] / $B } #- size correction in MB. -sub invCorrectSize { $A / 2 - sqrt(max(0, sqr($A) - 4 * $B * $_[0])) / 2 } +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 selectedSize { my ($packages) = @_; @@ -432,7 +433,7 @@ sub getOtherDeps($$) { $pkg or log::l("ignoring package $name-$version-$release in depslist is not in hdlist"), next; $version eq packageVersion($pkg) and $release eq packageRelease($pkg) - or log::l("warning package $name-$version-$release in depslist mismatch version or release in hdlist"), next; + or log::l("warning package $name-$version-$release in depslist mismatch version or release in hdlist ($version ne ", packageVersion($pkg), " or $release ne ", packageRelease($pkg), ")"), next; my $index = scalar @{$packages->[1]}; $index >= $pkg->{medium}{min} && $index <= $pkg->{medium}{max} @@ -479,7 +480,7 @@ sub getDeps($) { $pkg or log::l("ignoring $name-$version-$release in depslist is not in hdlist"), $mismatch = 1, next; $version eq packageVersion($pkg) and $release eq packageRelease($pkg) or - log::l("ignoring $name-$version-$release in depslist mismatch version or release in hdlist"), $mismatch = 1, next; + log::l("ignoring $name-$version-$release in depslist mismatch version or release in hdlist ($version ne ", packageVersion($pkg), " or $release ne ", packageRelease($pkg), ")"), $mismatch = 1, next; $pkg->{sizeDeps} = $sizeDeps; diff --git a/perl-install/share/compssList b/perl-install/share/compssList index c8f99e603..fac386269 100644 --- a/perl-install/share/compssList +++ b/perl-install/share/compssList @@ -1267,6 +1267,7 @@ citrix-icaclient-en 40 -70 -40 citrix-icaclient-fr 40 -70 -40 citrix-icaclient-ge 40 -70 -40 citrix-icaclient-sp 40 -70 -40 +eagle 15 0 25 printpro 0 0 0 printpro-agfa 0 0 0 printpro-alps 0 0 0 @@ -1311,9 +1312,12 @@ heroes3-demo 40 0 25 rt2-demo 40 0 25 MainActor 35 0 0 mupad 30 0 20 +mtv 45 0 35 +mtv-fullscrean-extension 45 0 35 NetPartitioner 0 25 0 omnimark 0 0 35 rebol-core 0 0 30 +SDL11 0 0 0 staroffice-de 30 -90 -30 staroffice-en 30 -90 -30 staroffice-fr 30 -90 -30 diff --git a/perl-install/share/compssUsers b/perl-install/share/compssUsers index 8b118756c..8688a34b6 100644 --- a/perl-install/share/compssUsers +++ b/perl-install/share/compssUsers @@ -40,12 +40,15 @@ Office Multimedia Support Sound Video + Applications/Multimedia Games Games + Amusements/Games Documentation Books Databases Databases + Applications/Databases -- cgit v1.2.1