From e335b2132f6c9508861c01cda50ce8734b872b4e Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Wed, 17 Dec 2008 16:39:51 +0000 Subject: Trying to simplify stuff in plugins (checks if a certain package is installed and installing ...) git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2427 95ad53e4-c205-0410-b2fa-d234c58c8868 --- lib/OpenSLX/Utils.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib') diff --git a/lib/OpenSLX/Utils.pm b/lib/OpenSLX/Utils.pm index dbc35270..9686a152 100644 --- a/lib/OpenSLX/Utils.pm +++ b/lib/OpenSLX/Utils.pm @@ -688,4 +688,18 @@ sub isInPath return $path ? 1 : 0; } +=item B + +Check whether a certain package is installed. Could be refined somehow to use +the package mechanism of the given distribution!? + +=cut + +sub isPackInstalled +{ + my $self = shift; + my $pack = shift; + return $self->isInPath($pack); +} + 1; -- cgit v1.2.3-55-g7522