karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject karaf git commit: [KARAF-4737] Check value of bundle start attribute to define if the bundle is start or resolved when installing a feature [Forced Update!]
Date Sun, 02 Oct 2016 10:13:42 GMT
Repository: karaf
Updated Branches:
  refs/heads/master 50be1c980 -> 88ab5e87e (forced update)


[KARAF-4737] Check value of bundle start attribute to define if the bundle is start or resolved
when installing a feature


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/88ab5e87
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/88ab5e87
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/88ab5e87

Branch: refs/heads/master
Commit: 88ab5e87e75131711d3db742b4d012c7a3d7c689
Parents: dd9ea05
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
Authored: Sun Oct 2 11:53:42 2016 +0200
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Sun Oct 2 12:13:31 2016 +0200

----------------------------------------------------------------------
 .../apache/karaf/features/internal/service/Deployer.java  | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/88ab5e87/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java
----------------------------------------------------------------------
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 2d3eb6e..9be3bc6 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
@@ -443,10 +443,16 @@ public class Deployer {
                 propagateState(states, feature, FeatureState.Started, resolver);
             }
         }
-        // Put default Started state for other bundles
+        // Put default Started state for other bundles if start attribute is true
         for (Resource resource : resolver.getBundles().keySet()) {
-            if (!states.containsKey(resource)) {
+            BundleInfo bundleInfo = null;
+            for (Map.Entry<String, Map<String, BundleInfo>> bis : resolver.getBundleInfos().entrySet())
{
+                bundleInfo = bis.getValue().get(getUri(resource));
+            }
+            if (bundleInfo != null && bundleInfo.isStart()) {
                 states.put(resource, FeatureState.Started);
+            } else {
+                states.put(resource, FeatureState.Resolved);
             }
         }
         // Only keep bundles resources


Mime
View raw message