You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by gn...@apache.org on 2018/01/11 12:38:55 UTC

[karaf] branch karaf-4.1.x updated: [KARAF-5566] Features installed through prerequisites lead to errors when uninstalling features

This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch karaf-4.1.x
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/karaf-4.1.x by this push:
     new 7e78479  [KARAF-5566] Features installed through prerequisites lead to errors when uninstalling features
7e78479 is described below

commit 7e7847908dc65ede6d07f3eb84bf4dc915d82e4f
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Thu Jan 11 13:38:38 2018 +0100

    [KARAF-5566] Features installed through prerequisites lead to errors when uninstalling features
---
 .../main/java/org/apache/karaf/features/internal/service/Deployer.java  | 2 +-
 .../org/apache/karaf/features/internal/service/FeaturesServiceImpl.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java
index 6732fca..a3ad0df 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java
@@ -280,7 +280,7 @@ public class Deployer {
             newRequest.overrides = request.overrides;
             newRequest.requirements = copy(dstate.state.requirements);
             for (String prereq : prereqs) {
-                addToMapSet(newRequest.requirements, ROOT_REGION, prereq);
+                addToMapSet(newRequest.requirements, ROOT_REGION, FeaturesServiceImpl.FEATURE_OSGI_REQUIREMENT_PREFIX + prereq);
             }
             newRequest.stateChanges = Collections.emptyMap();
             newRequest.updateSnaphots = request.updateSnaphots;
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
index 836b0a8..a80e9c8 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
@@ -114,8 +114,8 @@ import static org.apache.karaf.features.internal.util.MapUtils.remove;
  */
 public class FeaturesServiceImpl implements FeaturesService, Deployer.DeployCallback {
 
+    static final String FEATURE_OSGI_REQUIREMENT_PREFIX = "feature:";
     private static final Logger LOGGER = LoggerFactory.getLogger(FeaturesServiceImpl.class);
-    private static final String FEATURE_OSGI_REQUIREMENT_PREFIX = "feature:";
 
     /**
      * Our bundle and corresponding bundle context.

-- 
To stop receiving notification emails like this one, please contact
['"commits@karaf.apache.org" <co...@karaf.apache.org>'].