summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorOliver Tappe2007-12-30 18:52:18 +0100
committerOliver Tappe2007-12-30 18:52:18 +0100
commitb681bcf8ed09029520958106365fd61be8faf24f (patch)
treeee9d8e8b1cb810a2366fca180aef08dd15203a6d /installer
parent* completed test set for attribute merging, fixing several bugs along the (diff)
downloadcore-b681bcf8ed09029520958106365fd61be8faf24f.tar.gz
core-b681bcf8ed09029520958106365fd61be8faf24f.tar.xz
core-b681bcf8ed09029520958106365fd61be8faf24f.zip
cleaned up installation code in several ways:
* Removed some inconsistencies with respect to the separation of prereq- and bootstrap-packages, such that now all packages are being installed properly into the final system (the prereq packages have to installed twice for this). Before, the prereq packages were being installed without their scripts ever being run. While I haven't noticed a specific bug caused by this, the mere possibility seemed a good enough cause to change this. * added a default /etc/hosts file to all distros, as otherwise the lookup of localhost is flaky (at best) * fixed a multiple inclusion bug when expanding the packages of a selection * improved and clarified structure of selections: + now there is always a 'minimal' selection, on which most others are based + the default selection is now merely a different name for some other selection (currently, minimal or textmode, later this should probably be gnome or kde). git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1438 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer')
-rw-r--r--installer/OpenSLX/OSSetup/Distro/Debian.pm5
-rw-r--r--installer/OpenSLX/OSSetup/Distro/Ubuntu.pm3
-rw-r--r--installer/OpenSLX/OSSetup/Engine.pm14
-rw-r--r--installer/OpenSLX/OSSetup/Packager/Base.pm4
-rw-r--r--installer/OpenSLX/OSSetup/Packager/rpm.pm20
5 files changed, 12 insertions, 34 deletions
diff --git a/installer/OpenSLX/OSSetup/Distro/Debian.pm b/installer/OpenSLX/OSSetup/Distro/Debian.pm
index e430abd4..a514f10f 100644
--- a/installer/OpenSLX/OSSetup/Distro/Debian.pm
+++ b/installer/OpenSLX/OSSetup/Distro/Debian.pm
@@ -80,8 +80,9 @@ sub preSystemInstallationHook
# replace /usr/sbin/invoke-rc.d by a dummy, in order to avoid a whole lot
# of initscripts being started. Wishful thinking: there should be another
- # way to stop Ubuntu from doing this, as this is not really very supportive
- # of folder-based installations ...
+ # way to stop Debian from doing this, as this is not really very supportive
+ # of folder-based installations (then again: I may simply be too stupid
+ # to find out how it is supposed to work ...)
rename('/usr/sbin/invoke-rc.d', '/usr/sbin/_invoke-rc.d');
spitFile('/usr/sbin/invoke-rc.d', "#! /bin/sh\nexit 0\n");
chmod 0755, '/usr/sbin/invoke-rc.d';
diff --git a/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm b/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm
index 029c35c3..4ab5abbc 100644
--- a/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm
+++ b/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm
@@ -81,7 +81,8 @@ sub preSystemInstallationHook
# replace /usr/sbin/invoke-rc.d by a dummy, in order to avoid a whole lot
# of initscripts being started. Wishful thinking: there should be another
# way to stop Ubuntu from doing this, as this is not really very supportive
- # of folder-based installations ...
+ # of folder-based installations (then again: I may simply be too stupid
+ # to find out how it is supposed to work ...)
rename('/usr/sbin/invoke-rc.d', '/usr/sbin/_invoke-rc.d');
spitFile('/usr/sbin/invoke-rc.d', "#! /bin/sh\nexit 0\n");
chmod 0755, '/usr/sbin/invoke-rc.d';
diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm
index 42a1923f..9b2c6aba 100644
--- a/installer/OpenSLX/OSSetup/Engine.pm
+++ b/installer/OpenSLX/OSSetup/Engine.pm
@@ -700,8 +700,9 @@ sub _readDistroInfo
}
# expand all selections:
+ my $seen = {};
foreach my $selKey (keys %{$self->{'distro-info'}->{selection}}) {
- $self->_expandSelection($selKey);
+ $self->_expandSelection($selKey, $seen);
}
# dump distro-info, if asked for:
@@ -942,7 +943,7 @@ sub _expandSelection
{
my $self = shift;
my $selKey = shift;
- my $seen = shift || {};
+ my $seen = shift;
return if $seen->{$selKey};
$seen->{$selKey} = 1;
@@ -956,8 +957,9 @@ sub _expandSelection
return if !exists $self->{'distro-info'}->{selection}->{$base};
my $baseSelection = $self->{'distro-info'}->{selection}->{$base};
$self->_expandSelection($base, $seen);
- $selection->{packages}
- = "$baseSelection->{packages}\n$selection->{packages}";
+ my $packages = $selection->{packages} || '';
+ my $basePackages = $baseSelection->{packages} || '';
+ $selection->{packages} = $basePackages . "\n" . $packages;
}
return;
}
@@ -1406,10 +1408,6 @@ sub _stage1C_chrootAndInstallBasicVendorOS
$self->{packager}->importTrustedPackageKeys(\@keyFiles, $stage1cDir);
}
- # install prerequired packages (if distro requires it)
- $self->{packager}->installPrerequiredPackages(
- $self->{'prereq-packages'}, $stage1cDir
- );
# install bootstrap packages
$self->{packager}->installPackages(
$self->{'bootstrap-packages'}, $stage1cDir
diff --git a/installer/OpenSLX/OSSetup/Packager/Base.pm b/installer/OpenSLX/OSSetup/Packager/Base.pm
index c33b690b..55211183 100644
--- a/installer/OpenSLX/OSSetup/Packager/Base.pm
+++ b/installer/OpenSLX/OSSetup/Packager/Base.pm
@@ -49,10 +49,6 @@ sub importTrustedPackageKeys
{
}
-sub installPrerequiredPackages
-{
-}
-
sub installPackages
{
}
diff --git a/installer/OpenSLX/OSSetup/Packager/rpm.pm b/installer/OpenSLX/OSSetup/Packager/rpm.pm
index 0fd502a0..db1e7e1f 100644
--- a/installer/OpenSLX/OSSetup/Packager/rpm.pm
+++ b/installer/OpenSLX/OSSetup/Packager/rpm.pm
@@ -40,9 +40,7 @@ sub bootstrap
foreach my $pkg (@$pkgs) {
vlog(2, "unpacking package $pkg...");
if (slxsystem("ash", "-c", "rpm2cpio $pkg | cpio -i -d -u")) {
- warn _tr("unable to unpack package <%s> (%s)", $pkg, $!);
- # TODO: change this back to die() if cpio-ing fedora6-glibc
- # doesn't crash anymore... (needs busybox update, I suppose)
+ die _tr("unable to unpack package <%s> (%s)", $pkg, $!);
}
}
return;
@@ -65,22 +63,6 @@ sub importTrustedPackageKeys
return;
}
-sub installPrerequiredPackages
-{
- my $self = shift;
- my $pkgs = shift;
- my $finalPath = shift;
-
- return unless defined $pkgs && scalar(@$pkgs);
-
- if (slxsystem("rpm", "--root=$finalPath", "-ivh", "--nodeps", "--noscripts",
- "--force", @$pkgs)) {
- die _tr("error during prerequired-package-installation (%s)\n", $!);
- }
- slxsystem("rm", "-rf", "$finalPath/var/lib/rpm");
- return;
-}
-
sub installPackages
{
my $self = shift;