I am facing one more issue with the bindex, don't know whether its a bug or
not, but for my application this is a critical requirement
If i specify required Bundle version (either at Import-Package or at
Require-Bundle's bundle-version) in Bundle1's manifest like below
Manifest-Version: 1.0
Bundle-Name: Bundle1
Bundle-Activator: com.abc.consumer.ConsumerActivator
Import-Package: org.osgi.framework
Bundle-ManifestVersion: 2
Bundle-SymbolicName: Bundle1
Require-Bundle: Bundle2;bundle-version="1.0.0"
Bundle-Version: 1.0.0
and when I run bindex tool then this is the repository.xml data I am getting
<resource id='Bundle1/1.0.0' presentationname='Bundle1'
symbolicname='Bundle1' uri='bundles/Bundle1/1.0.0/Bundle1_1.0.0.jar'
version='1.0.0'>
<size>
1709
</size>
<capability name='bundle'>
<p n='manifestversion' v='2'/>
<p n='presentationname' v='Bundle1'/>
<p n='symbolicname' v='Bundle1'/>
<p n='version' t='version' v='1.0.0'/>
</capability>
<require extend='false'
filter='(&(symbolicname=Bundle2)(version>=1.0.0))' multiple='false'
name='bundle' optional='false'>
Require Bundle Bundle2; 1.0.0
</require>
<require extend='false'
filter='(&(package=org.osgi.framework)(version>=0.0.0))'
multiple='false' name='package' optional='false'>
Import package org.osgi.framework
</require>
</resource>
Problem exists here in <Require> tag while parsing through version
attribute. i.e,
<require extend='false'
filter='(&(symbolicname=Bundle2)(version>=1.0.0))' multiple='false'
name='bundle' optional='false'>
Why the version>=1.0.0 is coming when i specifically mentioned in my
manifest as version 1.0.0 only?
When Bundle2's version 1.1.0 installed (Which will be used by other bundles
), then Bundle1 is getting resolved with new version which i don't want to
happen. For Bundle1 I want to stick with older version of Bundle2 (As per my
requirements). But here I am unable to achieve this as bindex generating the
version as >=1.0.0, but it should be version=1.0.0 .
Please suggest a way to achieve this. Correct me if I am going wrong.
Thanks in advance.
Sriharsha.
pkriens wrote:
>
> The filter expression is wrong. By fixing the previous bug I actually
> introduced a null pointer exception and did not code the version
> correctly. This is now done correctly (I hope). I guess my bias
> against Require-Bundle shows a bit too much :-(
>
> Kind regards,
>
> Peter Kriens
>
>
>
>
> On 5 nov 2008, at 07:04, Stuart McCulloch wrote:
>
>> 2008/11/5 Sriharsha <[EMAIL PROTECTED]>
>>
>>>
>>> version ranges specified with Export/ import packages are working
>>> fine.
>>> So bindex is doing its job in putting version ranges at
>>> repository.xml, but
>>> i think OBR is unable to scan this information.
>>> Is it a bug in bindex? or in OBR?
>>> please suggest if I am going wrong anywhere.
>>>
>>
>> you're assuming there's only one error - certainly I think that
>> there may
>> well
>> be a bug in Felix's OBR implementation when resolving required
>> bundles,
>> but the last example repository.xml you posted was definitely
>> incorrect:
>>
>> filter='(&(symbolicname=Bundle2)(version>=[1.0.0,2.0.0]))'
>>
>> this is not a valid LDAP expression, so it looks like there's is
>> still an
>> issue
>> to fix in bindex (expansion of required version ranges into LDAP
>> format)
>> in addition to looking into the potential OBR issue.
>>
>> PS. if you want the OBR issue investigated you should really open a
>> JIRA
>> issue at http://issues.apache.org/jira/browse/FELIX along with a
>> testcase
>> and/or attached logs
>>
>> see also a similar issue relating to fragments:
>>
>> http://issues.apache.org/jira/browse/FELIX-760
>>
>> which also requires a version range fix to bindex
>>
>> --
>>> View this message in context:
>>> http://www.nabble.com/bindex-tool-is-unable-to-retain-the-Require-Bundle-bundle-version-info-in-the-repository.xml-tp20297305p20336503.html
>>> Sent from the Apache Felix - Users mailing list archive at
>>> Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>> --
>> Cheers, Stuart
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/bindex-tool-is-unable-to-retain-the-Require-Bundle-bundle-version-info-in-the-repository.xml-tp20297305p20481274.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]