Problem with Assembly bundles/No Version
----------------------------------------

                 Key: SLING-153
                 URL: https://issues.apache.org/jira/browse/SLING-153
             Project: Sling
          Issue Type: Bug
          Components: Repository
         Environment: linux fedora core 6/ jdk1.5_013
            Reporter: Pierre De Rop


Hello everyone;

In my assembly bundle, I provide a "Assembly-Bundles" header without specifying 
any version-range header.
I was thinking that, by doing do, the "Assembly installer" would try to  get  
the latest version of bundles from the OBR.
However, it looks like the Assembly installer tries to load requrired bundles 
with "version=0.0.0" from the OBR.

For instance:

MyAssembly.jar bundle contains:

Bundle-Version: 1.0.0
Assembly-Bundles: B1

However, when I try to deploy the MyAssembly.jar with the InstallerService, I 
see that the InstallerServices uses the following filter, when
downloading B1.jar , from OBR:

filter=(&(symbolicName=B1)(&(version>=0.0.0)(&(version<=0.0.1)(!(version=0.0.1)))))

In other words: the installerServices request a bundle B1 with version = 0.0.0 
from the OBR !

Doing the following patch solve the problem:
in org.apache.sling.osgi.assembly.internal.BundleSpec.java, change the 
initialization of the "version" attribute like this:

  private VersionRange version = VersionRange.DEFAULT; (line 110)
by
  private VersionRange version = null;

Doing so, the InstallerService will properly download the B1 bundle with the 
following filter:

filter=(symbolicName=B1)

Regards
/Pierre.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to