From bf23b738a02c06405b74c47dfcfe6a696a2f1e55 Mon Sep 17 00:00:00 2001 From: Kai Kreuzer Date: Tue, 5 Jan 2016 00:30:12 +0100 Subject: [PATCH] only install features if they are not already installed Signed-off-by: Kai Kreuzer --- .../org/openhab/core/karaf/internal/FeatureInstaller.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.core.karaf/src/main/java/org/openhab/core/karaf/internal/FeatureInstaller.java b/bundles/org.openhab.core.karaf/src/main/java/org/openhab/core/karaf/internal/FeatureInstaller.java index 226a28d0c1..e8c496bb44 100644 --- a/bundles/org.openhab.core.karaf/src/main/java/org/openhab/core/karaf/internal/FeatureInstaller.java +++ b/bundles/org.openhab.core.karaf/src/main/java/org/openhab/core/karaf/internal/FeatureInstaller.java @@ -78,8 +78,11 @@ public class FeatureInstaller { private void installFeature(String name) { try { - featuresService.installFeature(name); - logger.info("Installed '{}'", name); + Feature feature = featuresService.getFeature(name); + if (feature != null && !featuresService.isInstalled(feature)) { + featuresService.installFeature(name); + logger.info("Installed '{}'", name); + } } catch (Exception e) { logger.error("Failed installing '{}': {}", name, e.getMessage()); }