felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r1124295 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java
Date Wed, 18 May 2011 15:05:50 GMT
Author: rickhall
Date: Wed May 18 15:05:49 2011
New Revision: 1124295

URL: http://svn.apache.org/viewvc?rev=1124295&view=rev
Log:
Dependents for fragments are calculated differently. (FELIX-2950)

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java?rev=1124295&r1=1124294&r2=1124295&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java
Wed May 18 15:05:49 2011
@@ -93,7 +93,16 @@ class BundleRevisionDependencies
         List<BundleRevision> revisions = bundle.getRevisions();
         for (BundleRevision revision : revisions)
         {
-            if (m_dependentsMap.containsKey(revision))
+            // We have to special case fragments, since their dependencies
+            // are actually reversed (i.e., they require a host, but then
+            // the host ends up dependent on them at run time).
+            if (Util.isFragment(revision)
+                && (revision.getWiring() != null)
+                && !revision.getWiring().getRequiredWires(null).isEmpty())
+            {
+                return true;
+            }
+            else if (m_dependentsMap.containsKey(revision))
             {
                 return true;
             }



Mime
View raw message