diff options
author | Oliver Tappe | 2008-07-23 20:27:33 +0200 |
---|---|---|
committer | Oliver Tappe | 2008-07-23 20:27:33 +0200 |
commit | c13e5631307f48236be9155aea76fc9951741020 (patch) | |
tree | 8b864474bc810a039df5bfec4cb4f67b6ac18c84 /config-db/slxconfig-demuxer | |
parent | vmchooser changes: (diff) | |
download | core-c13e5631307f48236be9155aea76fc9951741020.tar.gz core-c13e5631307f48236be9155aea76fc9951741020.tar.xz core-c13e5631307f48236be9155aea76fc9951741020.zip |
implemented plugin dependency handling:
* installing a plugin into a vendor-OS is now only possible when required
plugins are already installed
* removing a plugin from a vendor-OS is now only possible when now plugins
that depend on this one are still installed
* the config-demuxer will check the plugin depedency hierarchy and bail if
any plugin is missing
* when several plugins are being auto-installed (e.g. when copying all
plugins from the '<<<default>>>' vendor-OS) the order of the plugins is
adjusted to comply with the dependency hierarchy
* declared one single dependency: vmchooser depends on vmware (please shout
if that is incorrect)
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1936 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db/slxconfig-demuxer')
-rwxr-xr-x | config-db/slxconfig-demuxer | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/config-db/slxconfig-demuxer b/config-db/slxconfig-demuxer index c435d7d4..b6662ff1 100755 --- a/config-db/slxconfig-demuxer +++ b/config-db/slxconfig-demuxer @@ -51,6 +51,7 @@ use OpenSLX::Basics; use OpenSLX::ConfigDB qw(:support); use OpenSLX::ConfigFolder; use OpenSLX::MakeInitRamFS::Engine; +use OpenSLX::OSPlugin::Roster; use OpenSLX::ScopedResource; use OpenSLX::Utils; @@ -586,8 +587,24 @@ sub writePluginConfigurationsForSystem # skip inactive plugins next unless $attrs->{"${pluginName}::active"}; - push @activePlugins, $pluginName; + + my $plugin = OpenSLX::OSPlugin::Roster->getPlugin($pluginName); + my $requiredPlugins = $plugin->getInfo()->{required} || []; + my @missingPlugins + = grep { + my $required = $_; + ! grep { + $_->{plugin_name} eq $required + } @{$info->{'installed-plugins'}}; + } + @$requiredPlugins; + if (@missingPlugins) { + die _tr( + 'the plugin "%s" requires the following plugins to be installed: "%s"!', + $pluginName, join(',', @missingPlugins) + ); + } next if $option{dryRun}; |