You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2010/02/25 17:02:27 UTC

[jira] Created: (FELIX-2138) The resolver sometimes fails to resolve against local resources

The resolver sometimes fails to resolve against local resources
---------------------------------------------------------------

                 Key: FELIX-2138
                 URL: https://issues.apache.org/jira/browse/FELIX-2138
             Project: Felix
          Issue Type: Bug
          Components: Bundle Repository (OBR)
            Reporter: Guillaume Nodet
            Assignee: Guillaume Nodet
             Fix For: bundlerepository-1.6.0


When looking for resources matching a requirement, there is this test:

            // We don't need to look at resources we've already looked at.
            if (!m_failedSet.contains(resources[resIdx])
                && !m_resolveSet.contains(resources[resIdx]))
            {


Unfortunately, it's wrong because the m_resolveSet may have changed since the call to searchResolvingResources() so we can't ignore already resolved resources here.

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


[jira] Commented: (FELIX-2138) The resolver should prefer required resources over optional resources to minimize the set of required resources

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838413#action_12838413 ] 

Guillaume Nodet commented on FELIX-2138:
----------------------------------------

Yeah, the problem is that I ended up with org.osgi.core  being a required resource, because it was selected for an optional package, but then was selected for required package (instead of using the system bundle provided package).
With the change I just made, optional resources are kept optional as long as possible.

> The resolver should prefer required resources over optional resources to minimize the set of required resources
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2138
>                 URL: https://issues.apache.org/jira/browse/FELIX-2138
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: bundlerepository-1.6.0
>
>
> When looking for resources matching a requirement, there is this test:
>             // We don't need to look at resources we've already looked at.
>             if (!m_failedSet.contains(resources[resIdx])
>                 && !m_resolveSet.contains(resources[resIdx]))
>             {
> Unfortunately, it's wrong because the m_resolveSet may have changed since the call to searchResolvingResources() so we can't ignore already resolved resources here.

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


[jira] Resolved: (FELIX-2138) The resolver should prefer required resources over optional resources to minimize the set of required resources

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved FELIX-2138.
------------------------------------

    Resolution: Fixed

Committing to https://svn.apache.org/repos/asf/felix/trunk ...
	M	bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java
Committed r916347


> The resolver should prefer required resources over optional resources to minimize the set of required resources
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2138
>                 URL: https://issues.apache.org/jira/browse/FELIX-2138
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: bundlerepository-1.6.0
>
>
> When looking for resources matching a requirement, there is this test:
>             // We don't need to look at resources we've already looked at.
>             if (!m_failedSet.contains(resources[resIdx])
>                 && !m_resolveSet.contains(resources[resIdx]))
>             {
> Unfortunately, it's wrong because the m_resolveSet may have changed since the call to searchResolvingResources() so we can't ignore already resolved resources here.

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


[jira] Commented: (FELIX-2138) The resolver sometimes fails to resolve against local resources

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838405#action_12838405 ] 

Guillaume Nodet commented on FELIX-2138:
----------------------------------------

Even with this change, the resolution output is still very bad in some cases.

The problem is that the resolution tends to not favor required resources to optional resources which then lead to more resources being considered requried.

> The resolver sometimes fails to resolve against local resources
> ---------------------------------------------------------------
>
>                 Key: FELIX-2138
>                 URL: https://issues.apache.org/jira/browse/FELIX-2138
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: bundlerepository-1.6.0
>
>
> When looking for resources matching a requirement, there is this test:
>             // We don't need to look at resources we've already looked at.
>             if (!m_failedSet.contains(resources[resIdx])
>                 && !m_resolveSet.contains(resources[resIdx]))
>             {
> Unfortunately, it's wrong because the m_resolveSet may have changed since the call to searchResolvingResources() so we can't ignore already resolved resources here.

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


[jira] Commented: (FELIX-2138) The resolver should prefer required resources over optional resources to minimize the set of required resources

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838410#action_12838410 ] 

Richard S. Hall commented on FELIX-2138:
----------------------------------------

I am not sure I completely understand the issues being raised here, could you explain them in more detail?

> The resolver should prefer required resources over optional resources to minimize the set of required resources
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2138
>                 URL: https://issues.apache.org/jira/browse/FELIX-2138
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: bundlerepository-1.6.0
>
>
> When looking for resources matching a requirement, there is this test:
>             // We don't need to look at resources we've already looked at.
>             if (!m_failedSet.contains(resources[resIdx])
>                 && !m_resolveSet.contains(resources[resIdx]))
>             {
> Unfortunately, it's wrong because the m_resolveSet may have changed since the call to searchResolvingResources() so we can't ignore already resolved resources here.

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


[jira] Updated: (FELIX-2138) The resolver should prefer required resources over optional resources to minimize the set of required resources

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated FELIX-2138:
-----------------------------------

    Summary: The resolver should prefer required resources over optional resources to minimize the set of required resources  (was: The resolver sometimes fails to resolve against local resources)

> The resolver should prefer required resources over optional resources to minimize the set of required resources
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2138
>                 URL: https://issues.apache.org/jira/browse/FELIX-2138
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: bundlerepository-1.6.0
>
>
> When looking for resources matching a requirement, there is this test:
>             // We don't need to look at resources we've already looked at.
>             if (!m_failedSet.contains(resources[resIdx])
>                 && !m_resolveSet.contains(resources[resIdx]))
>             {
> Unfortunately, it's wrong because the m_resolveSet may have changed since the call to searchResolvingResources() so we can't ignore already resolved resources here.

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


[jira] Closed: (FELIX-2138) The resolver should prefer required resources over optional resources to minimize the set of required resources

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler closed FELIX-2138.
-----------------------------------


> The resolver should prefer required resources over optional resources to minimize the set of required resources
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2138
>                 URL: https://issues.apache.org/jira/browse/FELIX-2138
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: bundlerepository-1.6.0
>
>
> When looking for resources matching a requirement, there is this test:
>             // We don't need to look at resources we've already looked at.
>             if (!m_failedSet.contains(resources[resIdx])
>                 && !m_resolveSet.contains(resources[resIdx]))
>             {
> Unfortunately, it's wrong because the m_resolveSet may have changed since the call to searchResolvingResources() so we can't ignore already resolved resources here.

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


[jira] Issue Comment Edited: (FELIX-2138) The resolver should prefer required resources over optional resources to minimize the set of required resources

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838410#action_12838410 ] 

Richard S. Hall edited comment on FELIX-2138 at 2/25/10 4:58 PM:
-----------------------------------------------------------------

I am not sure I completely understand the issues being raised here, could you explain them in more detail?

Judging from your title change, I think I agree.

      was (Author: rickhall):
    I am not sure I completely understand the issues being raised here, could you explain them in more detail?
  
> The resolver should prefer required resources over optional resources to minimize the set of required resources
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2138
>                 URL: https://issues.apache.org/jira/browse/FELIX-2138
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: bundlerepository-1.6.0
>
>
> When looking for resources matching a requirement, there is this test:
>             // We don't need to look at resources we've already looked at.
>             if (!m_failedSet.contains(resources[resIdx])
>                 && !m_resolveSet.contains(resources[resIdx]))
>             {
> Unfortunately, it's wrong because the m_resolveSet may have changed since the call to searchResolvingResources() so we can't ignore already resolved resources here.

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