felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r911482 - /felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/LocalRepositoryImpl.java
Date Thu, 18 Feb 2010 16:45:48 GMT
Author: gnodet
Date: Thu Feb 18 16:45:47 2010
New Revision: 911482

URL: http://svn.apache.org/viewvc?rev=911482&view=rev
Log:
FELIX-1621: OBR fails to take bundles into account that are already available in the framework

Modified:
    felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/LocalRepositoryImpl.java

Modified: felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/LocalRepositoryImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/LocalRepositoryImpl.java?rev=911482&r1=911481&r2=911482&view=diff
==============================================================================
--- felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/LocalRepositoryImpl.java
(original)
+++ felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/LocalRepositoryImpl.java
Thu Feb 18 16:45:47 2010
@@ -201,7 +201,10 @@
 
             // Convert bundle manifest header attributes to resource properties.
             convertAttributesToProperties(dict);
-            
+
+            // Convert properties to bundle capability
+            convertAttributesToBundleCapability();
+
             // Convert import package declarations into requirements.
             convertImportPackageToRequirement(dict);
 
@@ -330,6 +333,18 @@
             }
         }
 
+        private void convertAttributesToBundleCapability()
+        {
+            CapabilityImpl cap = new CapabilityImpl();
+            cap.setName("bundle");
+            if (getPresentationName() != null) {
+                cap.addP(Resource.PRESENTATION_NAME, getPresentationName());
+            }
+            cap.addP(Resource.SYMBOLIC_NAME, getSymbolicName());
+            cap.addP(Resource.VERSION, getVersion());
+            addCapability(cap);
+        }
+
         private void convertImportPackageToRequirement(Dictionary dict)
             throws InvalidSyntaxException
         {



Mime
View raw message