felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henning Andersen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (FELIX-3894) Bundle Repository sometimes picks old version rather than newest
Date Tue, 12 Feb 2013 11:21:13 GMT

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

Henning Andersen updated FELIX-3894:

    Attachment: repository.xml
> Bundle Repository sometimes picks old version rather than newest
> ----------------------------------------------------------------
>                 Key: FELIX-3894
>                 URL: https://issues.apache.org/jira/browse/FELIX-3894
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.6.6
>            Reporter: Henning Andersen
>         Attachments: repository.xml, TestNewest.java
> Consider a simple case, package com.stibo.y depends on com.stibo.x, residing in bundle
Y and X respectively. X is available in two versions, 1.0.3 and 1.0.4, both exporting com.stibo.x
in version 1.0.
> Adding bundle Y to a resolver and asking it to resolve, OBR will more or less randomly
pick one or the other version of X to satisfy Y's requirement. Which one is chosen depends
on the resulting order of resources in RepositoryImpl.m_resourceSet, which in turn depends
on the hashCode and the size of the hashSet.
> I will attach an example test case demonstrating this. Changing the version numbers in
repository.xml you should be able to see it pick the highest version sometimes and sometimes
the lowest version.
> It seems the OSGI spec is not entirely clear on how to handle this, but it is illogical
to leave it depending on the HashSet implementation. In my view, the logical choice would
be the bundle with the highest version number.
> Notice that ensuring micro-versions of packages is not easy for complex bundles. Also,
when bugfixing is done in a released version in a branch, relying on updates to the micro
version of exported packages will lead to confusion. Since the API package did not change
for the bugfix, the version number of the package should not change.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message