summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorOliver Tappe2007-05-28 17:08:34 +0200
committerOliver Tappe2007-05-28 17:08:34 +0200
commit41c8939bf7e412cc03dd2e9076cc677be9bf27c2 (patch)
tree1d3473d59207869553e02ca56b3ea9482291f449 /installer
parent* fixed typo: $1 => $! (diff)
downloadcore-41c8939bf7e412cc03dd2e9076cc677be9bf27c2.tar.gz
core-41c8939bf7e412cc03dd2e9076cc677be9bf27c2.tar.xz
core-41c8939bf7e412cc03dd2e9076cc677be9bf27c2.zip
* before an update, the meta-packager is automatically adjusted to the one that was used during
installation of that specific system git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1097 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer')
-rw-r--r--installer/OpenSLX/OSSetup/Engine.pm22
1 files changed, 18 insertions, 4 deletions
diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm
index da19ca7f..d6e36a57 100644
--- a/installer/OpenSLX/OSSetup/Engine.pm
+++ b/installer/OpenSLX/OSSetup/Engine.pm
@@ -181,8 +181,11 @@ sub installVendorOS
$self->changePersonalityIfNeeded();
$self->setupStage1D();
});
- slxsystem("touch $installInfoFile");
- # just touch the file, in order to indicate a proper installation
+ # creat the install-info file, in order to indicate a proper installation:
+ open(INFO, "> $installInfoFile")
+ or die _tr("unable to create info-file <%s> (%s)\n", $installInfoFile, $!);
+ print INFO "SLX_META_PACKAGER=$self->{distro}->{'meta-packager-type'}\n";
+ close(INFO);
slxsystem("rm $baseSystemFile");
# no longer needed, we have a full system now
vlog 0, _tr("Vendor-OS '%s' installed succesfully.\n",
@@ -242,7 +245,7 @@ sub cloneVendorOS
if ($source ne $lastCloneSource) {
open(CLONE_INFO, "> $cloneInfoFile")
or die _tr("unable to create clone-info file '%s', giving up! (%s)\n",
- $cloneInfoFile);
+ $cloneInfoFile, $!);
print CLONE_INFO "source=$source";
close CLONE_INFO;
}
@@ -463,8 +466,19 @@ sub createMetaPackager
{
my $self = shift;
+ my $metaPackagerType = $self->{distro}->{'meta-packager-type'};
+
+ my $installInfoFile = "$self->{'vendor-os-path'}/.openslx-install-info";
+ if (-e $installInfoFile) {
+ # activate the meta-packager that was used when installing the os:
+ my $installInfo = slurpFile($installInfoFile);
+ if ($installInfo =~ m[SLX_META_PACKAGER=(\w+)]) {
+ $metaPackagerType = $1;
+ }
+ }
+
my $metaPackagerClass
- = "OpenSLX::OSSetup::MetaPackager::$self->{distro}->{'meta-packager-type'}";
+ = "OpenSLX::OSSetup::MetaPackager::$metaPackagerType";
my $metaPackager =instantiateClass($metaPackagerClass);
$metaPackager->initialize($self);
$self->{'meta-packager'} = $metaPackager;