sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [sling-org-apache-sling-launchpad-installer] 05/11: SLING-2649 : Add support for run modes
Date Tue, 07 Nov 2017 09:53:30 GMT
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.launchpad.installer-1.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-launchpad-installer.git

commit 7a9f1ed7da92dd29f41ee40285fb8e97ccd31ac8
Author: Carsten Ziegeler <cziegeler@apache.org>
AuthorDate: Wed Nov 14 11:35:29 2012 +0000

    SLING-2649 :  Add support for run modes
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/launchpad/installer@1409168 13f79535-47bb-0310-9956-ffa450edef68
---
 .../launchpad/installer/impl/LaunchpadConfigInstaller.java     | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/launchpad/installer/impl/LaunchpadConfigInstaller.java
b/src/main/java/org/apache/sling/launchpad/installer/impl/LaunchpadConfigInstaller.java
index 0bf1abf..4d32446 100644
--- a/src/main/java/org/apache/sling/launchpad/installer/impl/LaunchpadConfigInstaller.java
+++ b/src/main/java/org/apache/sling/launchpad/installer/impl/LaunchpadConfigInstaller.java
@@ -101,7 +101,7 @@ public class LaunchpadConfigInstaller {
                         // if this is a configuration, hint could be run Modes
                         if ( !hint.equals(CONFIG_NAME) ) {
                             if ( isActive(hint, activeRunModes) == 0 ) {
-                                logger.debug("Launchpad ignoring {} : {} due to unactivated
run mode", resourceType, path);
+                                logger.debug("Launchpad ignoring {} : {} due to unactivated
run mode: ", new Object[] {resourceType, path, hint});
                                 continue;
                             }
                         }
@@ -169,12 +169,18 @@ public class LaunchpadConfigInstaller {
                         final int prio = PRIORITY + PRIORITY_BOOST * activeModes;
                         checkPath(resourceProvider, activeRunModes, installables, path, InstallableResource.TYPE_FILE,
prio);
                     } else {
-                        logger.debug("Ignoring path {} due to unactivated run mode", path);
+                        logger.debug("Ignoring path {} due to unactivated run mode: ", path,
name.substring(INSTALL_PREFIX.length());
                     }
                 } else {
                     logger.debug("Ignoring path {} - not an installation path", path);
                 }
             }
+        } else {
+            logger.warn("Run mode dependent installation not supported by launchpad content
provider {}", resourceProvider);
+            // revert to old behaviour
+            checkPath(resourceProvider, activeRunModes, installables, ROOT_PATH + '/' + CONFIG_NAME,
InstallableResource.TYPE_PROPERTIES, PRIORITY);
+            checkPath(resourceProvider, activeRunModes, installables, ROOT_PATH + '/' + INSTALL_NAME,
InstallableResource.TYPE_FILE, PRIORITY);
+
         }
 
         final InstallableResource [] toInstall = installables.toArray(new InstallableResource
[]{});

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

Mime
View raw message