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
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/LocalResourceImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/LocalResourceImpl.java
index 0abf109..1272b41 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/LocalResourceImpl.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/LocalResourceImpl.java
@@ -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 @@
// 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);