2008/11/3 Sriharsha <[EMAIL PROTECTED]>

>
> Hi..,
>
>  I am developing a swing application framework on Felix implementation of
> OSGi. I am using Felix OBR and bindex tool for my repository automation.
>
> PROBLEM:
> The bindex tool is unable to retain the require-bundle/bundle-version info
> in the repository.xml. Hence the bundle repository xml is not making the
> correct decision in picking up the proper bundles.
> Note, I have checked with package versions. Those are working fine. But for
> project specific reasons I need the required bundles to work as per
> specifications.
>
> EXAMPLE:
> My local repository contains two bundles Bundle1.jar and Bundle2.jar , in
> which Bundle1.jar depends on Bundle2's packages. Say Bundle1.jar depends on
> package "com.animal.cat" which is exported by Bundle2.jar.
>  Bundle1 manifest:
>
> Manifest-Version: 1.0
> Bundle-Name: Bundle1
> Bundle-Activator: com.consumer.ConsumerActivator
> Import-Package: org.osgi.framework
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: Bundle1
> Bundle-Version: 1.0.0
> Require-Bundle: Bundle2;bundle-version="1.0.0"
>
>
> Bundle2-1.0.0 manifest:
>
> Manifest-Version: 1.0
> Bundle-Name: Bundle2
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: Bundle2
> Export-Package: com.animal.cat
> Bundle-Version: 1.0.0
>
>
> Bundle2-1.1.0 manifest:
>
> Manifest-Version: 1.0
> Bundle-Name: Bundle2
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: Bundle2
> Export-Package: com.animal.cat
> Bundle-Version: 1.1.0
>  There are two versions of Bundle2 available i.e., version 1.0.0 and
> 1.1.0.
> In which Bundle1 requires Bundle2's version 1.0.0 only.
>
> When I run bindex tool on my repository in the repository.xml the following
> resource tag gets created for  Bundle1:
>
> <resource id='Bundle1/1.0.0' presentationname='Bundle1'
> symbolicname='Bundle1' uri='/OSGI/Localrepo/Bundles/Bundle1_1.0.0.jar'
> version='1.0.0'>
>    <size>
>      1707
>    </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>=0.0.0))' multiple='false'
> name='bundle' optional='false'>
>      Require Bundle Bundle2; 0.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 is at <require> tag of Bundle1, the line  "Require Bundle
> Bundle2;0.0.0"
>
> Because the bundle-version information for required bundle is not
> recognized
> by the Bindex tool, the OBR will actually resolve the Bundle1 dependencies
> with the highest available version for Bundle2(in this case version 1.1.0),
> which we dont want. Is this a bug in bindex? Please suggest.


I would say it's a bug in bindex - looking at the BundleInfo source:


http://www.osgi.org/svn/public/trunk/org.osgi.impl.bundle.bindex/src/org/osgi/impl/bundle/obr/resource/BundleInfo.java

it appears to be using the "version" attribute when processing the
Require-Bundle clauses, instead of the expected "bundle-version"

the main bindex page [http://www.osgi.org/Repository/BIndex] has
details of how to provide feedback to Peter about potential bugs.


> --
> 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-tp20297305p20297305.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

Reply via email to