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

rombert pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-installer-factory-packages.git

commit e956b589a53b1a483f0ea9cbf2515640b633567a
Author: Konrad Windszus <[email protected]>
AuthorDate: Fri Jan 27 08:36:20 2017 +0000

    SLING-6484 for SNAPSHOT versions really reinstall every time a new package 
has been uploaded
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1780517 
13f79535-47bb-0310-9956-ffa450edef68
---
 .../factory/packages/impl/PackageTransformer.java        | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/installer/factory/packages/impl/PackageTransformer.java
 
b/src/main/java/org/apache/sling/installer/factory/packages/impl/PackageTransformer.java
index 550ce20..ee49568 100644
--- 
a/src/main/java/org/apache/sling/installer/factory/packages/impl/PackageTransformer.java
+++ 
b/src/main/java/org/apache/sling/installer/factory/packages/impl/PackageTransformer.java
@@ -215,12 +215,16 @@ public class PackageTransformer implements 
ResourceTransformer, InstallTaskFacto
                     return;
                 }
 
-                // check if package was installed in the meantime
-                if (pkg.isInstalled()) {
-                    String message = MessageFormat.format("Package {0} was 
installed externally. Marking as installed.", pkgId);
-                    logger.info(message);
-                    this.setFinishedState(ResourceState.INSTALLED, null, 
message);
-                    return;
+                // if this is a SNAPSHOT version we always trigger a reinstall 
+                // (this workaround can be removed once 
https://issues.apache.org/jira/browse/JCRVLT-155 is implemented)
+                if (!pkgId.getVersionString().endsWith("-SNAPSHOT")) {
+                    // check if package was installed previously by some other 
means (or even by a previous run of the installer)
+                    if (pkg.isInstalled()) {
+                        String message = MessageFormat.format("Package {0} was 
installed externally. Marking as installed.", pkgId);
+                        logger.info(message);
+                        this.setFinishedState(ResourceState.INSTALLED, null, 
message);
+                        return;
+                    }
                 }
 
                 // check if dependencies are installed

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to