[
https://issues.apache.org/jira/browse/SLING-153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Felix Meschberger resolved SLING-153.
-------------------------------------
Resolution: Fixed
I implemented a different approach in Rev. 612038.
The approach does the following:
* Implement the VersionRange.equals and hashCode methods to properly
evaluate equals() checks. This is used in the BundleSpec.toFilter()
method as well as in the
RepositoryBundleDescriptor which defines the filter for downloading from
the OBR.
* Added a check for the default VersionRange to the
RepositoryBundleDescriptor constructor
which does not tamper with the version range in case the the default
version range is specified.
I did not implement your approach, because various users of the
BundleSpec.getVersion() method expect to get a non-null result.
Can you please verify that this works for you ? Thanks.
> 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
> Assignee: Felix Meschberger
>
> 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.