You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:23:40 UTC

[sling-org-apache-sling-tooling-support-install] 05/07: SLING-3019 - Provide a mechanism to install a bundle based on a directory

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.tooling.support.install-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-tooling-support-install.git

commit c309adaf46836866564c231d5ecf2fcd10f76ec1
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Oct 22 14:31:58 2013 +0000

    SLING-3019 - Provide a mechanism to install a bundle based on a
    directory
    
    Refresh bundles when both installing and updating, to make sure wirings
    are correct.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/support/install@1534647 13f79535-47bb-0310-9956-ffa450edef68
---
 .../apache/sling/tooling/support/install/impl/InstallServlet.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java b/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java
index dd0239e..ae3e7ac 100644
--- a/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java
+++ b/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java
@@ -237,13 +237,15 @@ public class InstallServlet extends HttpServlet {
         if (bundle != null) {
             // update
             bundle.update(in);
-
-            packageAdmin.refreshPackages(new Bundle[] { bundle });
         } else {
             // install
             final Bundle b = bundleContext.installBundle(location, in);
             b.start();
         }
+
+        // take into account added/removed packages for updated bundles and newly satisfied optional package imports
+        // for new installed bundles
+        packageAdmin.refreshPackages(new Bundle[] { bundle });
     }
 
     private Bundle getBundle(final String symbolicName) {

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.