summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-09-23 23:30:54 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-09-23 23:30:54 +0000
commit041bce7f1ab685a4290865e4eb2c2f5d2aaac285 (patch)
treed7305d5a8fb789cffc0c4795cc3ff7eff2b8585f
parent61b38e21c24cb2537b7105f5867745d0a569ec6f (diff)
downloaddrakx-041bce7f1ab685a4290865e4eb2c2f5d2aaac285.tar
drakx-041bce7f1ab685a4290865e4eb2c2f5d2aaac285.tar.gz
drakx-041bce7f1ab685a4290865e4eb2c2f5d2aaac285.tar.bz2
drakx-041bce7f1ab685a4290865e4eb2c2f5d2aaac285.tar.xz
drakx-041bce7f1ab685a4290865e4eb2c2f5d2aaac285.zip
no_comment
-rw-r--r--perl-install/ChangeLog22
-rw-r--r--perl-install/any.pm3
-rw-r--r--perl-install/fs.pm1
-rw-r--r--perl-install/install2.pm1
-rw-r--r--perl-install/install_any.pm4
-rw-r--r--perl-install/install_steps.pm9
-rw-r--r--perl-install/partition_table.pm1
-rw-r--r--perl-install/pkgs.pm7
-rw-r--r--perl-install/services.pm2
9 files changed, 38 insertions, 12 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index 35940d19b..6c2346a73 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -1,3 +1,25 @@
+2000-09-24 Pixel <pixel@mandrakesoft.com>
+
+ * fs.pm (umount): remove the ending "/" in the mntpoint. Otherwise
+ the mtab updating fails to update properly
+
+2000-09-23 Pixel <pixel@mandrakesoft.com>
+
+ * partition_table.pm (active): set the hd dirty
+
+ * services.pm (services): patched to handle xinetd sub-services
+
+ * install2.pm (formatPartitions): unset choosePackages done, so
+ that choosePackages is done again
+
+ * install_steps.pm (doPartitionDisksBefore): close pkgs::LOG and
+ umount /mnt/proc so that going back to partitioning doesn't fail
+ because /mnt can't be umounted.
+ umount_all twice after a sleep (HACK)
+
+ * pkgs.pm: updated $A, $B and $C for 7.2 (used by correctSize and
+ invCorrectSize)
+
2000-09-23 dam's <damien@mandrakesoft.com>
* netconnect.pm (isdn_detect): log NET_DEVICE when isdn too.
diff --git a/perl-install/any.pm b/perl-install/any.pm
index e4eed4c78..ca533b787 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -251,12 +251,9 @@ sub setAutologin {
sub writeandclean_ldsoconf {
my ($prefix) = @_;
my $file = "$prefix/etc/ld.so.conf";
-
- log::l("before: ", cat_($file));
output $file,
grep { !m|^(/usr)?/lib$| } #- no need to have /lib and /usr/lib in ld.so.conf
uniq cat_($file), "/usr/X11R6/lib\n";
- log::l("after: ", cat_($file));
}
sub shells {
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index c29faae8a..5b13ea6a6 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -223,6 +223,7 @@ sub mount($$$;$) {
#- takes the mount point to umount (can also be the device)
sub umount($) {
my ($mntpoint) = @_;
+ $mntpoint =~ s|/$||;
log::l("calling umount($mntpoint)");
syscall_('umount', $mntpoint) or die _("error unmounting %s: %s", $mntpoint, "$!");
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index fa074531b..03e0b591b 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -270,6 +270,7 @@ sub doPartitionDisks {
}
sub formatPartitions {
+ $o->{steps}{choosePackages}{done} = 0;
unless ($o->{isUpgrade}) {
$o->choosePartitionsToFormat($o->{fstab});
$o->formatMountPartitions($o->{fstab}) unless $::testing;
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index d992302a8..7a6814d03 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -253,7 +253,7 @@ sub getAvailableSpace_mounted {
my ($prefix) = @_;
my $dir = -d "$prefix/usr" ? "$prefix/usr" : "$prefix";
my (undef, $free) = common::df($dir) or return;
- log::l("getAvailableSpace_mounted $free");
+ log::l("getAvailableSpace_mounted $free KB");
$free * 1024 || 1;
}
sub getAvailableSpace_raw {
@@ -694,7 +694,7 @@ sub getHds {
sub log_sizes {
my ($o) = @_;
my @df = common::df($o->{prefix});
- log::l(sprintf "Installed: %dMB(df), %dMB(rpm)", ($df[0] - $df[1]) / 1024, sum(`rpm --root $o->{prefix} -qa --queryformat "%{size}\n"`) / sqr(1024));
+ log::l(sprintf "Installed: %dMB(df), %dMB(rpm)", ($df[0] - $df[1]) / 1024, sum(`rpm --root $o->{prefix} -qa --queryformat "%{size}\n"`) / sqr(1024)) if -x "$o->{prefix}/bin/rpm";
}
1;
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 3845469b8..ab087233a 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -131,7 +131,12 @@ sub doPartitionDisksBefore {
install_any::getFile("XXX"); #- close still opened filehandle
eval { fs::umount("/tmp/hdimage") };
}
- eval { fs::umount_all($o->{fstab}, $o->{prefix}) } if $o->{fstab} && !$::testing && !$::live;
+ eval {
+ close pkgs::LOG;
+ eval { fs::umount("$o->{prefix}/proc") };
+ eval { fs::umount_all($o->{fstab}, $o->{prefix}) };
+ eval { sleep 1; fs::umount_all($o->{fstab}, $o->{prefix}) } if $@; #- HACK
+ } if $o->{fstab} && !$::testing && !$::live;
$o->{raid} ||= {};
}
@@ -249,7 +254,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);
- log::l("available size $available (corrected $availableCorrected)");
+ log::l(sprintf "available size %dMB (corrected %dMB)", $available / sqr(1024), $availableCorrected / sqr(1024));
foreach (values %{$packages->[0]}) {
pkgs::packageSetFlagSkip($_, 0);
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index d7d2c823f..e1b5b796a 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -486,6 +486,7 @@ sub active($$) {
$_->{active} = 0 foreach @{$hd->{primary}{normal}};
$part->{active} = 0x80;
+ hd->{isDirty} = 1;
}
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 62107d72c..d71ff768a 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -195,9 +195,9 @@ sub extractHeaders($$$) {
#- a limit to change the approximation to use a linear one.
#- for information above this point, we have the corrected size below the
#- original size wich is absurd, this point is named D below.
-my $A = -1.922e-05;
-my $B = 1.18411;
-my $C = 13.2; #- doesn't take hdlist's into account as getAvailableSpace will do it.
+my $A = -1.21568e-05;
+my $B = 1.21561;
+my $C = -23.9889; #- doesn't take hdlist's into account as getAvailableSpace will do it.
my $D = (-sqrt(sqr($B - 1) - 4 * $A * $C) - ($B - 1)) / 2 / $A; #- $A is negative so a positive solution is with - sqrt ...
sub correctSize { $_[0] < $D ? ($A * $_[0] + $B) * $_[0] + $C : $_[0] } #- size correction in MB.
sub invCorrectSize { $_[0] < $D ? (sqrt(sqr($B) + 4 * $A * ($_[0] - $C)) - $B) / 2 / $A : $_[0]; } #- size correction in MB.
@@ -652,7 +652,6 @@ sub readCompssList {
my %done;
foreach (@$langs) {
- log::l("readCompssList lang: $_");
my $p = packageByName($packages, "locales-$_") or next;
foreach ($p, @{$p->{provides} || []}, map { packageByName($packages, $_) } @{$by_lang{$_} || []}) {
next if !$_ || $done{$_}; $done{$_} = 1;
diff --git a/perl-install/services.pm b/perl-install/services.pm
index fd1ea51ce..319e4ff49 100644
--- a/perl-install/services.pm
+++ b/perl-install/services.pm
@@ -88,7 +88,7 @@ xfs => __("Starts and stops the X Font Server at boot time and shutdown."),
sub services {
my ($prefix) = @_;
my $cmd = $prefix ? "chroot $prefix" : "";
- my @l = map { [ /(\S+)/, /:on/ ] } sort `LANGUAGE=C $cmd chkconfig --list`;
+ my @l = map { [ /([^\s:]+)/, /\bon\b/ ] } grep { !/:$/ } sort `LANGUAGE=C $cmd chkconfig --list`;
[ map { $_->[0] } @l ], [ mapgrep { $_->[1], $_->[0] } @l ];
}