[ 
https://issues.apache.org/jira/browse/SLING-2217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13116806#comment-13116806
 ] 

Andrew Khoury commented on SLING-2217:
--------------------------------------

Carsten, I tested the following with org.apache.sling.installer.core-3.2.2:
1. Upload bundle.jar to /apps/myapp/install/bundle.jar with "Bundle-Version: 
2.0.0" in the MANIFEST.MF
2. Unpack the bundle and set "Bundle-Version: 1.0.0" in the MANIFEST.MF
3. Repack the bundle
4. Upload the repacked bundle.jar to /apps/myapp/install/bundle.jar (Nothing 
happens)

Bertrand, yes my scenario is different than what is provided in the test cases. 
 However, there is one similar test case for the upload of a bundle that has a 
filename with a lower version number.
        // Downgrade to lower version, installed bundle must not change
        {
            final Object listener = this.startObservingBundleEvents();
            installer.updateResources(URL_SCHEME, getInstallableResource(
                    getTestBundle(BUNDLE_BASE_NAME + "-testbundle-1.0.jar"), 
"digestA"), null);
            sleep(150);

            // make sure no updates happen
            this.assertNoBundleEvents("Older bundle should not be installed.", 
listener, symbolicName);
            final Bundle b = assertBundle("After ignored downgrade", 
symbolicName, "1.2", Bundle.ACTIVE);
            assertEquals("Bundle ID must not change after ignored downgrade", 
bundleId, b.getBundleId());
        }

                
> Need a good way to downgrade a bundle
> -------------------------------------
>
>                 Key: SLING-2217
>                 URL: https://issues.apache.org/jira/browse/SLING-2217
>             Project: Sling
>          Issue Type: Improvement
>          Components: Installer
>    Affects Versions: JCR Installer 3.1.0
>            Reporter: Andrew Khoury
>            Priority: Minor
>
> The JCR install module should allow for downgrading to an older version of a 
> bundle if the bundle jar is replaced.  This is relevant when you do a release 
> of a bundle in a QA or Staging environment and later decide that the release 
> should be rolled back to the old version.  It might make sense to just to 
> simplify things by reinstalling the bundle to the osgi container whenever the 
> jar file is replaced.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to