summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
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 /perl-install/install_steps.pm
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 ***
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm16
1 files changed, 12 insertions, 4 deletions
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);
}