From add9e687e5aeb4ca069737f83dbaee925636b83a Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 18 Jul 2007 16:15:20 +0000 Subject: * fixed two bugs that inhibited the importing of vendor-OSes that are not fully supported yet (i.e. that were cloned). git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1246 95ad53e4-c205-0410-b2fa-d234c58c8868 --- installer/OpenSLX/OSSetup/Engine.pm | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'installer') diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm index 82ab6163..3ab035bc 100644 --- a/installer/OpenSLX/OSSetup/Engine.pm +++ b/installer/OpenSLX/OSSetup/Engine.pm @@ -139,12 +139,28 @@ sub initialize exit 1; } my $support = $supportedDistros{lc($distroName)}->{support}; - if ($actionType eq 'install' && $support !~ m[install]i) { - print _tr( - "Sorry, distro '%s' can not be installed, only cloned.\n", - $distroName - ); - exit 1; + if ($support !~ m[install]i) { + if ($actionType eq 'install') { + print _tr( + "Sorry, distro '%s' can not be installed, only cloned!\n", + $distroName + ); + exit 1; + } + elsif ($actionType eq 'update') { + print _tr( + "Sorry, vendor-OS '%s' has been cloned, don't know how to update it!\n", + $distroName + ); + exit 1; + } + elsif ($actionType eq 'shell') { + print _tr( + "Sorry, vendor-OS '%s' has been cloned, no support for chrooted shell available!\n", + $distroName + ); + exit 1; + } } # load module for the requested distro: @@ -162,7 +178,7 @@ sub initialize $distro->initialize($self); $self->{distro} = $distro; - if ($actionType ne 'clone') { + if ($actionType =~ m{^(install|update|shell)}) { # setup path to distribution-specific info: my $sharedDistroInfoDir = "$openslxConfig{'base-path'}/share/distro-info/$distro->{'base-name'}"; @@ -203,7 +219,7 @@ sub initialize = "$openslxConfig{'private-path'}/stage1/$self->{'vendor-os-name'}"; vlog(1, "vendor-OS path is '$self->{'vendor-os-path'}'"); - if ($actionType ne 'clone') { + if ($actionType =~ m{^(install|update|shell)}) { $self->createPackager(); $self->createMetaPackager(); } -- cgit v1.2.3-55-g7522