SLING-875 Treat bundle files indicating the system.bundle symbolic
name specially.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@733696 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/InstallAction.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/InstallAction.java
index f437d2f..d2da770 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/InstallAction.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/InstallAction.java
@@ -179,17 +179,24 @@
 
             // check for existing bundle first
             Bundle updateBundle = null;
-            Bundle[] bundles = getBundleContext().getBundles();
-            for ( int i = 0; i < bundles.length; i++ )
+            if ( Constants.SYSTEM_BUNDLE_SYMBOLICNAME.equals( symbolicName ) )
             {
-                if ( ( bundles[i].getLocation() != null && bundles[i].getLocation().equals( location ) )
-                    || ( bundles[i].getSymbolicName() != null && bundles[i].getSymbolicName().equals( symbolicName ) ) )
+                updateBundle = getBundleContext().getBundle( 0 );
+            }
+            else
+            {
+                Bundle[] bundles = getBundleContext().getBundles();
+                for ( int i = 0; i < bundles.length; i++ )
                 {
-                    updateBundle = bundles[i];
-                    break;
+                    if ( ( bundles[i].getLocation() != null && bundles[i].getLocation().equals( location ) )
+                        || ( bundles[i].getSymbolicName() != null && bundles[i].getSymbolicName().equals( symbolicName ) ) )
+                    {
+                        updateBundle = bundles[i];
+                        break;
+                    }
                 }
             }
-
+            
             if ( updateBundle != null )
             {