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

Thomas Watson updated FELIX-3707:
---------------------------------

    Attachment: org.apache.felix.resolver.patch

The previous patch fixes part of the problem, but it only checks the current 
level for consistency of bundle capabilities.  This patch modifies the loop 
that checks for consistency on the next level down against every resource which 
the current resource depends on.

I did this by simply iterating over all the requirements instead of using any 
of the package blame maps.  This was necessary to ensure that we check every 
required capability resource even if that capability does not pull in packages 
to the class space of the current resource (i.e. generic capabilities or the 
rare bundle capability that does not export any packages).

As a result of this change I noticed a performance issue when attempting to 
resolve a large number of root resources.  The resultCache was getting 
discarded each time we checked package space consistency.  I changed that to 
only discard the resultCache when a ResolutionException occurs while checking 
consistency at the top level consistency check loop.
                
> Uses constraints not properly checked with require bundle
> ---------------------------------------------------------
>
>                 Key: FELIX-3707
>                 URL: https://issues.apache.org/jira/browse/FELIX-3707
>             Project: Felix
>          Issue Type: Bug
>          Components: Resolver
>         Environment: All
>            Reporter: Thomas Watson
>              Labels: patch
>         Attachments: org.apache.felix.resolver.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> The following set of manifests should result in require.b1 being unresolvable 
> due to an inconsistent class space for package p1:
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: require.b1
> Bundle-Version: 1.0.0
> Require-Bundle: require.b2, require.b3
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: require.b2
> Bundle-Version: 1.0.0
> Export-Package: p1
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: require.b3
> Bundle-Version: 1.0.0
> Export-Package: p2; uses:="p1"
> Require-Bundle: require.b4
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: require.b4
> Bundle-Version: 1.0.0
> Export-Package: p1
> I will attach a possible fix and testcase

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

Reply via email to