summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>1999-10-14 15:52:49 +0000
committerFrancois Pons <fpons@mandriva.com>1999-10-14 15:52:49 +0000
commitb99336c5440cb50de9e8ca46833df72415deb723 (patch)
tree488b89ca8ebdbdcb86c4ded06d7e6de766fbf75c
parentd0c9225cfba0d80b3a3652db6376b8474ede0750 (diff)
downloaddrakx-backup-do-not-use-b99336c5440cb50de9e8ca46833df72415deb723.tar
drakx-backup-do-not-use-b99336c5440cb50de9e8ca46833df72415deb723.tar.gz
drakx-backup-do-not-use-b99336c5440cb50de9e8ca46833df72415deb723.tar.bz2
drakx-backup-do-not-use-b99336c5440cb50de9e8ca46833df72415deb723.tar.xz
drakx-backup-do-not-use-b99336c5440cb50de9e8ca46833df72415deb723.zip
*** empty log message ***
-rw-r--r--perl-install/common.pm2
-rw-r--r--perl-install/install2.pm5
-rw-r--r--perl-install/install_any.pm12
-rw-r--r--perl-install/install_steps.pm16
-rw-r--r--perl-install/install_steps_interactive.pm2
5 files changed, 30 insertions, 7 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 7a9bddc5d..481ce793f 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -224,7 +224,7 @@ sub syscall_ {
sub crypt_ {
- local $_ = (gettimeofday())[1] % 0x40;
+ local $_ = sprintf("%2d", (gettimeofday())[1] % 0x40); #- make sure it is 2 char long.
tr [\0-\x3f] [0-9a-zA-Z./];
crypt($_[0], $_)
}
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 353b054b1..2a388a5d0 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -320,6 +320,10 @@ sub choosePackages {
sub doInstallStep {
$o->readBootloaderConfigBeforeInstall if $_[1] == 1;
+ #- some packages need such files for proper installation.
+ install_any::write_ldsoconf($o->{prefix});
+ fs::write($o->{prefix}, $o->{fstab});
+
$o->beforeInstallPackages;
$o->installPackages($o->{packages});
$o->afterInstallPackages;
@@ -378,7 +382,6 @@ sub addUser {
#------------------------------------------------------------------------------
#-PADTODO
sub createBootdisk {
- fs::write($o->{prefix}, $o->{fstab});
modules::write_conf("$o->{prefix}/etc/conf.modules", 'append');
$o->createBootdisk($_[1] == 1);
}
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 96cd86be6..7d1929e03 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -247,3 +247,15 @@ sub searchAndMount4Upgrade {
fs::mount_all([ grep { isExt2($_) || isSwap($_) } @{$o->{fstab}} ], $o->{prefix});
}
}
+
+sub write_ldsoconf {
+ my ($prefix) = @_;
+ my $file = "$prefix/etc/ld.so.conf";
+
+ #- write a minimal ld.so.conf file unless it already exists.
+ unless (-s "$file") {
+ local *F;
+ open F, ">$file" or die "unable to open for writing $file";
+ print F "/usr/lib\n";
+ }
+}
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 6794899f7..ffb2a14c4 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -181,10 +181,18 @@ sub beforeInstallPackages {
sub installPackages($$) {
my ($o, $packages) = @_;
- #- my $toInstall = [ grep { $_->{selected} && !$_->{installed} } values %$packages ];
- my @toInstall = $packages->{basesystem}{selected} && !$packages->{basesystem}{installed} ? ($packages->{basesystem}) : ();
- push @toInstall, grep { $_->{base} && $_->{selected} && !$_->{installed} } values %$packages;
- push @toInstall, grep { !$_->{base} && $_->{selected} && !$_->{installed} } values %$packages;
+ #- hack to ensure proper ordering for installation of packages.
+ my @firstToInstall = qw(basesystem sed);
+ my %firstInstalled;
+ my @toInstall;
+ foreach (@firstToInstall) {
+ if ($packages->{$_}{selected} && !$packages->{$_}{installed}) {
+ push @toInstall, $packages->{$_};
+ $firstInstalled{$_} = 1; #- avoid installing twice a package.
+ }
+ }
+ push @toInstall, grep { $_->{base} && $_->{selected} && !$_->{installed} && !$firstInstalled{$_->{name}} } values %$packages;
+ push @toInstall, grep { !$_->{base} && $_->{selected} && !$_->{installed} && !$firstInstalled{$_->{name}} } values %$packages;
pkgs::install($o->{prefix}, \@toInstall);
}
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 0282b6269..8fc12fe69 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -58,7 +58,7 @@ sub selectLanguage($) {
$o->{useless_thing_accepted} = $o->ask_from_list_('',
"Wanring no wrranty, be carfull it's gonna explose ytou romcpature",
- [ _("Accept"), _("Refuse") ], "Accept") eq "Accept" or exit(1) unless $o->{useless_thing_accepted};
+ [ _("Accept"), _("Refuse") ], _("Accept")) eq _("Accept") or exit(1) unless $o->{useless_thing_accepted};
}
#------------------------------------------------------------------------------