You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Emily Jiang (JIRA)" <ji...@apache.org> on 2010/11/11 23:10:13 UTC

[jira] Closed: (FELIX-2673) Mandatory directive stoped working on OBR 1.6.4. It worked OBR 1.4.1

     [ https://issues.apache.org/jira/browse/FELIX-2673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emily Jiang closed FELIX-2673.
------------------------------

    Resolution: Not A Problem

This jira is caused by the different behaviour for mandatory directive handling. However, it might save me a lot of time if any committer can comment or offer any help for my questions in this jira regarding whether there is any mandatory directive handling changes between the releases. 

> Mandatory directive stoped working on OBR 1.6.4. It worked OBR 1.4.1
> --------------------------------------------------------------------
>
>                 Key: FELIX-2673
>                 URL: https://issues.apache.org/jira/browse/FELIX-2673
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.6.4
>            Reporter: Emily Jiang
>
> I moved up to bundlerepository-1.6.4 from bundlerepository-1.4.1 and found the mandatory directive stoped working. I have three bundles obr.bundle121, obr.bundle122 and obr.bundle123.  Their manifest.mf files are shown below:
> bundle obr.bundle121:
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: obr.bundle121
> Bundle-Version: 3.0.0
> Bundle-Vendor: IBM
> Export-Package:obr.bundle121
> Import-Package:org.componenttest.logging,
>  obr.bundle122;version="2.3";company=mood;local=yes
> bundle obr.bundle122:
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: obr.bundle122
> Bundle-Version: 1.0.0
> Bundle-Vendor: IBM
> Import-Package: org.componenttest.logging
> Export-Package: obr.bundle122;version=3;company=mood;local=yes;security=yes;mandatory:="company,security"
> bundle obr.bundle123:
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: obr.bundle123
> Bundle-Version: 3.0
> Bundle-Vendor: IBM
> Import-Package: org.componenttest.logging
> Export-Package: obr.bundle122;version=2.4;company=mood;local=yes;security=yes;mandatory:="company,local"
> When I provision obr.bundle121, obr.bundle122 was identified as required instead of obr.bundle123. As a conseqence, the obr.bundle121 cannot be started after installation, as the obr.bundle122 has mandatory requirement of 'company' and 'security', which obr.bundle121 does not provide. However, obr.bundle121 provides the mandatory attributes required by obr.bundle123, which also exports the package at the version of which obr.bundle121 needs. The OBR provisioner should wire the obr.bundle121 to the bundle obr.bundle123 instead of obr.bundle122. It suggests the mandatory directive is not functioning in the new OBR level.
> Below is the repository.xml to represent the bundle manifest.
> <?xml version="1.0" encoding="UTF-8"?>
> <repository name="obr.eba12.eba_1.0.0">
> <resource id="org.componenttest.logging/1.0.0" presentationname="Logging Plug-in" symbolicname="org.componenttest.logging" uri="" version="1.0.0">
> <capability name="bundle">
> <p n="presentationname" v="Logging Plug-in"/>
> <p n="version" t="version" v="1.0.0"/>
> <p n="symbolicname" v="org.componenttest.logging"/>
> <p n="Bundle-ManifestVersion" v="2"/>
> <p n="mandatory" v=""/>
> </capability>
> <capability name="package">
> <p n="package" v="org.componenttest.logging"/>
> <p n="version" t="version" v="0.0.0"/>
> <p n="bundle-symbolic-name" v="org.componenttest.logging"/>
> <p n="bundle-version" t="version" v="1.0.0"/>
> <p n="mandatory" v=""/>
> </capability>
> <capability name="service">
> <p n="service" v="service"/>
> <p n="osgi.service.blueprint.compname" v="ResultLoggerImpl"/>
> <p n="objectClass" t="set" v="org.componenttest.logging.ResultLogger"/>
> <p n="service.ranking" v="0"/>
> <p n="mandatory" v=""/>
> </capability>
> <require extend="false" filter="(&amp;(package=org.osgi.framework)(version&gt;=1.3.0)(version&lt;=2.0.0)(!(version=2.0.0)))" multiple="false" name="package" optional="false">Requires package with attributes {package=org.osgi.framework, version=[1.3.0,2.0.0)}</require>
> </resource>
> <resource id="obr.bundle121/3.0.0" presentationname="Bundle Plug-in" symbolicname="obr.bundle121" uri="" version="3.0.0">
> <capability name="bundle">
> <p n="presentationname" v="Bundle Plug-in"/>
> <p n="version" t="version" v="3.0.0"/>
> <p n="symbolicname" v="obr.bundle121"/>
> <p n="Bundle-ManifestVersion" v="2"/>
> <p n="mandatory" v=""/>
> </capability>
> <capability name="package">
> <p n="package" v="obr.bundle121"/>
> <p n="version" t="version" v="0.0.0"/>
> <p n="bundle-symbolic-name" v="obr.bundle121"/>
> <p n="bundle-version" t="version" v="3.0.0"/>
> <p n="mandatory" v=""/>
> </capability>
> <require extend="false" filter="(&amp;(package=org.componenttest.logging)(version&gt;=0.0.0))" multiple="false" name="package" optional="false">Requires package with attributes {package=org.componenttest.logging, version=0.0.0}</require>
> <require extend="false" filter="(&amp;(package=obr.bundle122)(version&gt;=2.3.0)(local=yes)(company=mood)(mandatory:&lt;*local, company))" multiple="false" name="package" optional="false">Requires package with attributes {package=obr.bundle122, version=2.3.0, local=yes, company=mood}</require>
> </resource>
> <resource id="obr.bundle122/1.0.0" presentationname="Bundle Plug-in" symbolicname="obr.bundle122" uri="" version="1.0.0">
> <capability name="bundle">
> <p n="presentationname" v="Bundle Plug-in"/>
> <p n="version" t="version" v="1.0.0"/>
> <p n="symbolicname" v="obr.bundle122"/>
> <p n="Bundle-ManifestVersion" v="2"/>
> <p n="mandatory" v=""/>
> </capability>
> <capability name="package">
> <p n="security" v="yes"/>
> <p n="mandatory" v="company,security"/>
> <p n="package" v="obr.bundle122"/>
> <p n="version" t="version" v="3"/>
> <p n="local" v="yes"/>
> <p n="bundle-symbolic-name" v="obr.bundle122"/>
> <p n="company" v="mood"/>
> <p n="bundle-version" t="version" v="1.0.0"/>
> </capability>
> <require extend="false" filter="(&amp;(package=org.componenttest.logging)(version&gt;=0.0.0))" multiple="false" name="package" optional="false">Requires package with attributes {package=org.componenttest.logging, version=0.0.0}</require>
> </resource>
> <resource id="obr.bundle123/3.0.0" presentationname="Bundle Plug-in" symbolicname="obr.bundle123" uri="" version="3.0.0">
> <capability name="bundle">
> <p n="presentationname" v="Bundle Plug-in"/>
> <p n="version" t="version" v="3.0"/>
> <p n="symbolicname" v="obr.bundle123"/>
> <p n="Bundle-ManifestVersion" v="2"/>
> <p n="mandatory" v=""/>
> </capability>
> <capability name="package">
> <p n="security" v="yes"/>
> <p n="mandatory" v="company,local"/>
> <p n="package" v="obr.bundle122"/>
> <p n="version" t="version" v="2.4"/>
> <p n="local" v="yes"/>
> <p n="bundle-symbolic-name" v="obr.bundle123"/>
> <p n="company" v="mood"/>
> <p n="bundle-version" t="version" v="3.0.0"/>
> </capability>
> <require extend="false" filter="(&amp;(package=org.componenttest.logging)(version&gt;=0.0.0))" multiple="false" name="package" optional="false">Requires package with attributes {package=org.componenttest.logging, version=0.0.0}</require>
> </resource>
> </repository>
> Are there any xml changes in mandatory directive expression between version 1.4.1 and 1.6.4? If not, there is a regression, as it works on bundlerepsoitory-1.4.1.

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