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/19 22:34:28 UTC
[jira] Created: (FELIX-2110) The resolver should be able to resolve
for some requirements in addition to resources
The resolver should be able to resolve for some requirements in addition to resources
-------------------------------------------------------------------------------------
Key: FELIX-2110
URL: https://issues.apache.org/jira/browse/FELIX-2110
Project: Felix
Issue Type: Improvement
Components: Bundle Repository (OBR)
Reporter: Guillaume Nodet
For example if one want to resolve a given package.
We could add
void add(Requirement requirement);
on the Resolver.
Another way would be to create a fake resource with the requirement. This works as long as you don't want to actually install, because the resolver would then need a real resource. So in all cases, the resolver need to know about those resources, so it may be easier to let him create and handle those completely.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-2110) The resolver should be able to
resolve for some requirements in addition to resources
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836343#action_12836343 ]
Richard S. Hall commented on FELIX-2110:
----------------------------------------
I am not adamantly against this idea, but let's just put it this way, if/when I get to the point of integrating the framework resolver into OBR, if it causes me issues, I won't start creating special cases all of the place to handle it, I will likely just throw it out. I think the value of having a real resolver outweighs this use case. Of course, if I can get it to fit without issue, then I will happily keep it. Seem fair?
> The resolver should be able to resolve for some requirements in addition to resources
> -------------------------------------------------------------------------------------
>
> Key: FELIX-2110
> URL: https://issues.apache.org/jira/browse/FELIX-2110
> Project: Felix
> Issue Type: Improvement
> Components: Bundle Repository (OBR)
> Reporter: Guillaume Nodet
>
> For example if one want to resolve a given package.
> We could add
> void add(Requirement requirement);
> on the Resolver.
> Another way would be to create a fake resource with the requirement. This works as long as you don't want to actually install, because the resolver would then need a real resource. So in all cases, the resolver need to know about those resources, so it may be easier to let him create and handle those completely.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-2110) The resolver should be able to
resolve for some requirements in addition to resources
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836138#action_12836138 ]
Richard S. Hall commented on FELIX-2110:
----------------------------------------
But this is how the resolver works in the framework, we have an entity that has a set of requirements associated with it, we don't just have requirements. I am not keen to diverge from the approach of the framework resolver.
What we could possibly do to improve the user experience is to make some utility methods for constructing a resource...this is something a JIRA issue has asked for with respect to converting a bundle to a resource, so perhaps there are a set of general utility methods around this area.
> The resolver should be able to resolve for some requirements in addition to resources
> -------------------------------------------------------------------------------------
>
> Key: FELIX-2110
> URL: https://issues.apache.org/jira/browse/FELIX-2110
> Project: Felix
> Issue Type: Improvement
> Components: Bundle Repository (OBR)
> Reporter: Guillaume Nodet
>
> For example if one want to resolve a given package.
> We could add
> void add(Requirement requirement);
> on the Resolver.
> Another way would be to create a fake resource with the requirement. This works as long as you don't want to actually install, because the resolver would then need a real resource. So in all cases, the resolver need to know about those resources, so it may be easier to let him create and handle those completely.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (FELIX-2110) The resolver should be able to
resolve for some requirements in addition to resources
Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet resolved FELIX-2110.
------------------------------------
Resolution: Fixed
Fix Version/s: karaf 1.6.0
Committing to https://svn.apache.org/repos/asf/felix/trunk ...
M bundlerepository/src/main/java/org/apache/felix/bundlerepository/RepositoryAdminImpl.java
M bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java
M bundlerepository/src/test/java/org/apache/felix/bundlerepository/ResolverImplTest.java
M org.osgi.service.obr/src/main/java/org/osgi/service/obr/RepositoryAdmin.java
M org.osgi.service.obr/src/main/java/org/osgi/service/obr/Resolver.java
Committed r912353
> The resolver should be able to resolve for some requirements in addition to resources
> -------------------------------------------------------------------------------------
>
> Key: FELIX-2110
> URL: https://issues.apache.org/jira/browse/FELIX-2110
> Project: Felix
> Issue Type: Improvement
> Components: Bundle Repository (OBR)
> Reporter: Guillaume Nodet
> Assignee: Guillaume Nodet
> Fix For: karaf 1.6.0
>
>
> For example if one want to resolve a given package.
> We could add
> void add(Requirement requirement);
> on the Resolver.
> Another way would be to create a fake resource with the requirement. This works as long as you don't want to actually install, because the resolver would then need a real resource. So in all cases, the resolver need to know about those resources, so it may be easier to let him create and handle those completely.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (FELIX-2110) The resolver should be able to
resolve for some requirements in addition to resources
Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet reassigned FELIX-2110:
--------------------------------------
Assignee: Guillaume Nodet
> The resolver should be able to resolve for some requirements in addition to resources
> -------------------------------------------------------------------------------------
>
> Key: FELIX-2110
> URL: https://issues.apache.org/jira/browse/FELIX-2110
> Project: Felix
> Issue Type: Improvement
> Components: Bundle Repository (OBR)
> Reporter: Guillaume Nodet
> Assignee: Guillaume Nodet
>
> For example if one want to resolve a given package.
> We could add
> void add(Requirement requirement);
> on the Resolver.
> Another way would be to create a fake resource with the requirement. This works as long as you don't want to actually install, because the resolver would then need a real resource. So in all cases, the resolver need to know about those resources, so it may be easier to let him create and handle those completely.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-2110) The resolver should be able to
resolve for some requirements in addition to resources
Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836337#action_12836337 ]
Guillaume Nodet commented on FELIX-2110:
----------------------------------------
I do agree with the use of fake resources internally so as to not modify the resolution algorithm at all.
However, I really think from a user point of view, creating fake resources is a nonsense: that's not what the user want to express.
The use cases is not new (see FELIX-280, 3 years old).
I'm proposing to add the
void add(Requirement requirement)
Requirement[] getAddedRequirements()
methods on the Resolver and
Requirement requirement(String name, String filter) throws InvalidSyntaxException;
on the RepositoryAdmin
THen the implementation can easily use a fake resource to hold the requirements. We just need to make sure this resource is removed from all the results. I don't honestly see the value in using a fake resource, but if you wish to keep the resolution algorithm only deal with resources, i'm fine with it.
> The resolver should be able to resolve for some requirements in addition to resources
> -------------------------------------------------------------------------------------
>
> Key: FELIX-2110
> URL: https://issues.apache.org/jira/browse/FELIX-2110
> Project: Felix
> Issue Type: Improvement
> Components: Bundle Repository (OBR)
> Reporter: Guillaume Nodet
>
> For example if one want to resolve a given package.
> We could add
> void add(Requirement requirement);
> on the Resolver.
> Another way would be to create a fake resource with the requirement. This works as long as you don't want to actually install, because the resolver would then need a real resource. So in all cases, the resolver need to know about those resources, so it may be easier to let him create and handle those completely.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-2110) The resolver should be able to
resolve for some requirements in addition to resources
Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836132#action_12836132 ]
Guillaume Nodet commented on FELIX-2110:
----------------------------------------
Ok, I'll have a look, but this forces the user to actually implement Resource and Requirement.
I don't really see the point in forcing the user doing so.
I think the resolver concept is not to resolve a set of resources, but to resolve a set of requirements. If the requirement is
bundle:(&(symbolicname=xxx)(version=yyy))
then so be it.
But the use cases I had in mind is the an easy way to say "OBR, you're kinda smart: give the set of bundles so that I can have this service". Or "What do I have to deploy if I need the xxx package".
Currently, the loop is done a resource, but I think it would be cleaner to resolve a requirement.
> The resolver should be able to resolve for some requirements in addition to resources
> -------------------------------------------------------------------------------------
>
> Key: FELIX-2110
> URL: https://issues.apache.org/jira/browse/FELIX-2110
> Project: Felix
> Issue Type: Improvement
> Components: Bundle Repository (OBR)
> Reporter: Guillaume Nodet
>
> For example if one want to resolve a given package.
> We could add
> void add(Requirement requirement);
> on the Resolver.
> Another way would be to create a fake resource with the requirement. This works as long as you don't want to actually install, because the resolver would then need a real resource. So in all cases, the resolver need to know about those resources, so it may be easier to let him create and handle those completely.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-2110) The resolver should be able to
resolve for some requirements in addition to resources
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836121#action_12836121 ]
Richard S. Hall commented on FELIX-2110:
----------------------------------------
I'm hesitant to start adding variations of things that are already possible. If you just create a fake resource that has no content associated with it, then it cannot be deploy. If the current implementation errors in this situation, that is an easy fix.
> The resolver should be able to resolve for some requirements in addition to resources
> -------------------------------------------------------------------------------------
>
> Key: FELIX-2110
> URL: https://issues.apache.org/jira/browse/FELIX-2110
> Project: Felix
> Issue Type: Improvement
> Components: Bundle Repository (OBR)
> Reporter: Guillaume Nodet
>
> For example if one want to resolve a given package.
> We could add
> void add(Requirement requirement);
> on the Resolver.
> Another way would be to create a fake resource with the requirement. This works as long as you don't want to actually install, because the resolver would then need a real resource. So in all cases, the resolver need to know about those resources, so it may be easier to let him create and handle those completely.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-2110) The resolver should be able to
resolve for some requirements in addition to resources
Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836346#action_12836346 ]
Guillaume Nodet commented on FELIX-2110:
----------------------------------------
Souds good to me. I'll try to implement that with a fake resource underneath, but still offer a clean api to the user as described earlier.
> The resolver should be able to resolve for some requirements in addition to resources
> -------------------------------------------------------------------------------------
>
> Key: FELIX-2110
> URL: https://issues.apache.org/jira/browse/FELIX-2110
> Project: Felix
> Issue Type: Improvement
> Components: Bundle Repository (OBR)
> Reporter: Guillaume Nodet
>
> For example if one want to resolve a given package.
> We could add
> void add(Requirement requirement);
> on the Resolver.
> Another way would be to create a fake resource with the requirement. This works as long as you don't want to actually install, because the resolver would then need a real resource. So in all cases, the resolver need to know about those resources, so it may be easier to let him create and handle those completely.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.