Permalink
Browse files

Apply patch (FELIX-2465) to add system.bundle alias bundle capability.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1352149 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent d37d14c commit a8bb100514855c3d3f1a4e060c8c729403afb1af Richard S. Hall committed Jun 20, 2012
@@ -24,6 +24,7 @@
import java.util.StringTokenizer;
import org.apache.felix.bundlerepository.Capability;
+import org.apache.felix.bundlerepository.Resource;
import org.osgi.framework.Bundle;
import org.osgi.framework.Constants;
import org.osgi.framework.InvalidSyntaxException;
@@ -68,6 +69,11 @@ public void close() { }
// For the system bundle, add a special platform capability.
if (m_bundle.getBundleId() == 0)
{
+ // add the alias bundle symbolic name "system.bundle"
+ CapabilityImpl sysBundleCap = new CapabilityImpl(Capability.BUNDLE);
+ sysBundleCap.addProperty(Resource.SYMBOLIC_NAME, Constants.SYSTEM_BUNDLE_SYMBOLICNAME);
+ addCapability(sysBundleCap);
+
// set the execution environment(s) as Capability ee of the
// system bundle to resolve bundles with specific requirements
String ee = m_bundle.getBundleContext().getProperty(Constants.FRAMEWORK_EXECUTIONENVIRONMENT);

0 comments on commit a8bb100

Please sign in to comment.