summaryrefslogtreecommitdiffstats
path: root/os-plugins
diff options
context:
space:
mode:
authorOliver Tappe2008-02-13 22:07:28 +0100
committerOliver Tappe2008-02-13 22:07:28 +0100
commite642bca01a3a9d2c38e1a42cb7a4a9cadb5af7d7 (patch)
tree9354739de3c92e66e5778df425100bbea97421be /os-plugins
parent* added support for letting plugins suggest additional kernel modules (diff)
downloadcore-e642bca01a3a9d2c38e1a42cb7a4a9cadb5af7d7.tar.gz
core-e642bca01a3a9d2c38e1a42cb7a4a9cadb5af7d7.tar.xz
core-e642bca01a3a9d2c38e1a42cb7a4a9cadb5af7d7.zip
* actually activated the removal of a plugin in OSPlugin engine
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1541 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins')
-rw-r--r--os-plugins/OpenSLX/OSPlugin/Engine.pm34
1 files changed, 34 insertions, 0 deletions
diff --git a/os-plugins/OpenSLX/OSPlugin/Engine.pm b/os-plugins/OpenSLX/OSPlugin/Engine.pm
index fe2bf1ac..b96673fb 100644
--- a/os-plugins/OpenSLX/OSPlugin/Engine.pm
+++ b/os-plugins/OpenSLX/OSPlugin/Engine.pm
@@ -106,6 +106,40 @@ sub getPlugin
sub removePlugin
{
+ my $self = shift;
+
+ # create ossetup-engine for given vendor-OS:
+ my $osSetupEngine = OpenSLX::OSSetup::Engine->new;
+ $osSetupEngine->initialize($self->{'vendor-os-name'}, 'plugin');
+ $self->{'os-setup-engine'} = $osSetupEngine;
+ $self->{'distro-name'} = $osSetupEngine->{'distro-name'};
+
+ my $chrootedPluginRepoPath
+ = "$openslxConfig{'base-path'}/plugin-repo/$self->{'plugin-name'}";
+ my $pluginRepoPath = "$self->{'vendor-os-path'}/$chrootedPluginRepoPath";
+ my $chrootedPluginTempPath = "/tmp/slx-plugin/$self->{'plugin-name'}";
+ my $pluginTempPath = "$self->{'vendor-os-path'}/$chrootedPluginTempPath";
+ foreach my $path ($pluginRepoPath, $pluginTempPath) {
+ if (slxsystem("mkdir -p $path")) {
+ croak(_tr("unable to create path '%s'! (%s)", $path, $!));
+ }
+ }
+
+ $self->{plugin}->preRemovalPhase($pluginRepoPath, $pluginTempPath);
+
+ $self->{'os-setup-engine'}->callChrootedFunctionForVendorOS(
+ sub {
+ $self->{plugin}->removalPhase(
+ $chrootedPluginRepoPath, $chrootedPluginTempPath
+ );
+ }
+ );
+
+ $self->{plugin}->postRemovalPhase($pluginRepoPath, $pluginTempPath);
+
+ $self->_removeInstalledPluginFromDB();
+
+ return 1;
}
sub _loadPlugin