From 2c74bd6106405e6dda4c58446a7e2de53c705a79 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Thu, 3 Apr 2008 16:53:39 +0000 Subject: * finally corrected algorithm for merging attributes from default-system & vendor-OS into a specific system - fixing #213 git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1719 95ad53e4-c205-0410-b2fa-d234c58c8868 --- config-db/OpenSLX/ConfigDB.pm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'config-db/OpenSLX/ConfigDB.pm') diff --git a/config-db/OpenSLX/ConfigDB.pm b/config-db/OpenSLX/ConfigDB.pm index 324a3cf2..964206a1 100644 --- a/config-db/OpenSLX/ConfigDB.pm +++ b/config-db/OpenSLX/ConfigDB.pm @@ -2430,15 +2430,11 @@ sub mergeDefaultAttributesIntoSystem my $installedPlugins = shift; my $originInfo = shift; - # first look into default system - my $defaultSystem = $self->fetchSystemByFilter({name => '<<>>'}); - mergeAttributes($system, $defaultSystem, $originInfo, 'default-system'); - - # push any attributes found in the plugins that are installed into + # merge any attributes found in the plugins that are installed into # the vendor-OS: if (ref $installedPlugins eq 'ARRAY' && @$installedPlugins) { for my $plugin (@$installedPlugins) { - pushAttributes($system, $plugin, $originInfo, 'vendor-OS'); + mergeAttributes($system, $plugin, $originInfo, 'vendor-OS'); } # the above will have merged stage1 attributes, too, so we remove @@ -2450,7 +2446,12 @@ sub mergeDefaultAttributesIntoSystem } } - # finally push the attributes specified for the system itself + # merge yet unset stuff from default system + my $defaultSystem = $self->fetchSystemByFilter({name => '<<>>'}); + mergeAttributes($system, $defaultSystem, $originInfo, 'default-system'); + + # finally push the attributes specified for the default client (these + # overrule anything else) my $defaultClient = $self->fetchClientByFilter({name => '<<>>'}); pushAttributes($system, $defaultClient, $originInfo, 'default-client'); -- cgit v1.2.3-55-g7522