This is an automated email from the ASF dual-hosted git repository. sagarmiglani pushed a commit to branch SLING-12829 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-launchpad-base.git
commit 4079a8aee81622381bc187a1878b3d060ea7b3f3 Author: Sagar Miglani <[email protected]> AuthorDate: Tue Jun 17 13:36:48 2025 +0530 SLING-12829 - Sling launchpad ignores startlevel change of startup directory bundles --- .../apache/sling/launchpad/base/impl/BootstrapInstaller.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/sling/launchpad/base/impl/BootstrapInstaller.java b/src/main/java/org/apache/sling/launchpad/base/impl/BootstrapInstaller.java index a2239b0..b78b066 100644 --- a/src/main/java/org/apache/sling/launchpad/base/impl/BootstrapInstaller.java +++ b/src/main/java/org/apache/sling/launchpad/base/impl/BootstrapInstaller.java @@ -446,7 +446,7 @@ class BootstrapInstaller { // check for an installed Bundle with the symbolic name Bundle installedBundle = currentBundles.get(symbolicName); - if (ignore(installedBundle, manifest)) { + if (ignore(installedBundle, startLevel, manifest)) { logger.log(Logger.LOG_INFO, "Ignoring " + bundleJar + ": More recent version already installed"); return false; // SHORT CIRCUIT } @@ -602,13 +602,19 @@ class BootstrapInstaller { * @return <code>true</code> if the manifest does not describe a bundle with * a higher version number. */ - private boolean ignore(final Bundle installedBundle, final Manifest manifest) { + private boolean ignore(final Bundle installedBundle, int startLevel, final Manifest manifest) { // the bundle is not installed yet, so we have to install it if (installedBundle == null) { return false; } + int installedBundleStartLevel = + installedBundle.adapt(BundleStartLevel.class).getStartLevel(); + if (startLevel != installedBundleStartLevel) { + return false; + } + String versionProp = manifest.getMainAttributes().getValue(Constants.BUNDLE_VERSION); Version newVersion = Version.parseVersion(versionProp);
