You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Karl Rieb (JIRA)" <ji...@apache.org> on 2013/10/22 15:18:43 UTC

[jira] [Created] (FELIX-4288) Bundle not updated when unused capabilities changed (ResolverImpl.getResolvableRequirements)

Karl Rieb created FELIX-4288:
--------------------------------

             Summary: Bundle not updated when unused capabilities changed (ResolverImpl.getResolvableRequirements)
                 Key: FELIX-4288
                 URL: https://issues.apache.org/jira/browse/FELIX-4288
             Project: Felix
          Issue Type: Bug
          Components: Bundle Repository (OBR)
    Affects Versions: bundlerepository-1.6.6
            Reporter: Karl Rieb


It is common (and recommended) practice for bundles to Import the same packages they Export.  This means a bundle, if it exports any packages, always depends on its own capabilities.  

The ResolverImpl.getResolvableRequirements() ignores whether the requirements are coming from the bundle that is trying to be updated.  The resolver will always considered the old bundle's capabilities as "used" since the old bundle depends on itself.  This prevents the resolver from performing an in-place update on the bundle even though there may be no other bundles depending on that capability.

To reproduce, create and deploy a bundle that exports a single package (and imports that same package).  Now create a newer version of the bundle that no longer exports the package.  Try to update the old bundle with the new one will result in both bundles being installed (since the required capabilities don't match).  This is unexpected since no other bundles on the system depend on the unused export.

Proposed fix would skip requirements from the resource that is trying to be updated (performed in ResolverImpl.getResolvableRequirements()).



--
This message was sent by Atlassian JIRA
(v6.1#6144)