dulvac closed pull request #3: SLING-7669 StartupManager overwrites the 
frameworkstartlevel property…
URL: https://github.com/apache/sling-org-apache-sling-launchpad-base/pull/3
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/src/main/java/org/apache/sling/launchpad/base/impl/StartupManager.java 
b/src/main/java/org/apache/sling/launchpad/base/impl/StartupManager.java
index 39c6dd0..d7a5f9c 100644
--- a/src/main/java/org/apache/sling/launchpad/base/impl/StartupManager.java
+++ b/src/main/java/org/apache/sling/launchpad/base/impl/StartupManager.java
@@ -80,6 +80,14 @@
             this.logger.log(Logger.LOG_INFO, "Detected startup mode. Starting 
in mode " + this.mode);
         }
 
+        // populate the sling target start level from the framework one, if 
not set,
+        // otherwise overwrite the framework one
+        if 
(!properties.containsKey(SharedConstants.SLING_INSTALL_TARGETSTARTLEVEL)) {
+            properties.put(SharedConstants.SLING_INSTALL_TARGETSTARTLEVEL, 
properties.get(Constants.FRAMEWORK_BEGINNING_STARTLEVEL));
+        } else {
+            properties.put(Constants.FRAMEWORK_BEGINNING_STARTLEVEL, 
properties.get(SharedConstants.SLING_INSTALL_TARGETSTARTLEVEL));
+        }
+
         this.targetStartLevel = 
Long.valueOf(properties.get(Constants.FRAMEWORK_BEGINNING_STARTLEVEL));
 
         this.incrementalStartupEnabled = 
Boolean.valueOf(properties.get(SharedConstants.SLING_INSTALL_INCREMENTAL_START));
diff --git 
a/src/main/java/org/apache/sling/launchpad/base/shared/SharedConstants.java 
b/src/main/java/org/apache/sling/launchpad/base/shared/SharedConstants.java
index 98a1a99..51764ad 100644
--- a/src/main/java/org/apache/sling/launchpad/base/shared/SharedConstants.java
+++ b/src/main/java/org/apache/sling/launchpad/base/shared/SharedConstants.java
@@ -132,10 +132,19 @@
      * The name of the configuration property defining the startlevel
      * for installs and updates. The framework starts with this start level
      * and the startup manager increases the start level one by one until
-     * the initial framework start level is reached (value is 
"sling.framework.install.startlevel").
+     * the target start level is reached ({@value 
#SLING_INSTALL_TARGETSTARTLEVEL}).
      * This level is only used if {@link #SLING_INSTALL_INCREMENTAL_START} is
      * enabled. Default value is 10.
      * @since 2.4.0
      */
     public static final String SLING_INSTALL_STARTLEVEL = 
"sling.framework.install.startlevel";
+
+    /**
+     * The name of the configuration property defining the target startlevel
+     * The framework starts with the startlevel of {@value 
#SLING_INSTALL_STARTLEVEL}
+     * and the stops when it reaches this level
+     * Default value is the value of the osgi initial framework start level
+     * @see {@link #SLING_INSTALL_STARTLEVEL}
+     */
+    public static final String SLING_INSTALL_TARGETSTARTLEVEL = 
"sling.framework.install.targetstartlevel";
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to