diff options
author | Oliver Tappe | 2008-01-27 15:51:47 +0100 |
---|---|---|
committer | Oliver Tappe | 2008-01-27 15:51:47 +0100 |
commit | fde7d8f091d03b8d2c0c14e3f56eab700082beba (patch) | |
tree | d940abafc4d6b261805cd0cb7b381246ef85b732 /config-db/OpenSLX/DBSchema.pm | |
parent | * fixed bug that left orphaned installed_plugins when removing a vendor-OS (diff) | |
download | core-fde7d8f091d03b8d2c0c14e3f56eab700082beba.tar.gz core-fde7d8f091d03b8d2c0c14e3f56eab700082beba.tar.xz core-fde7d8f091d03b8d2c0c14e3f56eab700082beba.zip |
Hopefully finished the adjustments of the tools with respect to theme
naming and other recent discussions of user interface.
* adjusted and simplified code to the fact that plugins are now named
in all lowercase
* slxos-plugin --verbose list now shows description for each plugin and
a list of supported attributes
* fixed some outstanding issues with respect to lowercasing of plugin names
* Separated theme::name into theme::splash, theme::displaymanager and
theme::desktop, leading to DB-schema 0.24.
Please note that although these attributes exist, currently only
theme::splash is being used (the new ones will be used by the reimplemented
mkdxsinitrd)
* moved some information gathering from OSPlugin::Engine into OSPlugin::Roster,
where it belongs
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1500 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db/OpenSLX/DBSchema.pm')
-rw-r--r-- | config-db/OpenSLX/DBSchema.pm | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/config-db/OpenSLX/DBSchema.pm b/config-db/OpenSLX/DBSchema.pm index aa6ef1c1..ede1b9a3 100644 --- a/config-db/OpenSLX/DBSchema.pm +++ b/config-db/OpenSLX/DBSchema.pm @@ -35,7 +35,7 @@ use OpenSLX::Basics; ### fk => foreign key (integer) ################################################################################ -my $VERSION = 0.23; +my $VERSION = 0.24; my $DbSchema = { 'version' => $VERSION, @@ -624,6 +624,40 @@ sub _schemaUpgradeDBFrom return 1; }, + 0.24 => sub { + my $metaDB = shift; + + vlog(0, "upgrading schema version to 0.24"); + + # split theme::name into theme::splash, theme::displaymanager and + # theme::desktop + foreach my $system ($metaDB->fetchSystemByFilter()) { + my $attrs = $system->{attrs} || {}; + next if !exists $attrs->{'theme::name'}; + $attrs->{'theme::splash'} + = $attrs->{'theme::displaymanager'} + = $attrs->{'theme::desktop'} + = $attrs->{'theme::name'}; + delete $attrs->{'theme::name'}; + $metaDB->setSystemAttrs($system->{id}, $attrs); + } + + # force all theme names to lowercase + foreach my $vendorOS ($metaDB->fetchVendorOSByFilter()) { + my @installedPlugins + = $metaDB->fetchInstalledPlugins($vendorOS->{id}); + foreach my $plugin (@installedPlugins) { + my $pluginName = $plugin->{plugin_name}; +print "$vendorOS->{id} $pluginName\n"; + $metaDB->removeInstalledPlugin($vendorOS->{id}, $pluginName); + $metaDB->addInstalledPlugin($vendorOS->{id}, lc($pluginName)); + } + } + + $metaDB->schemaSetDBVersion(0.24); + + return 1; + }, ); 1; |