Community
Participate
Working Groups
At the moment exclusions only seem to work if a repo is mapped verbatim. If I explicitly map a category then exclude an IU from that category the explicit mapping wins, and the excluded IU is included in the model. This makes sense, however there are occasions when this makes things harder to model. Take an example repo with 10 categories. I only want 8 of these, and do not want some of the IUs from these 8 categories. This can only be achieved now by re-creating categories using custom categories and then explicitly adding selected IUs to these, omitting those we do not want. How hard would it be to try always to honour exclusions, and to error if they cannot be honoured, forcing the modeller to review their model? If this would be too complicated then fine. Version ranges now make models much more robust, so explicitly mapping IUs is not such a maintenance chore. However, it would be nice to be warned, somehow, that the exclusion was ineffective because overridden by the explicit mapping.
Same question when you want to include a list of feature, but want to exclude a transitive optional feature. For example I have mapped the repository: http://dist.springsource.com/release/TOOLS/update/e3.7/ From this repository I only want a few features. So I have added the feature: <features name="org.springframework.ide.eclipse.integration.feature.feature.group" categories="//@customCategories[identifier='com.macif.eclipse.spring.category']"/> This feature depends on the feature "Spring Core" (org.springframework.ide.eclipse.feature) that depends on the feature "org.springframework.ide.eclipse.uaa.feature" but it is an optional dependency. So I would like to remove uaa from my aggregated repo. But the exclusion doesn't work. The workaround is to not include any feature at all, but instead exclude every other features. Very annoying.
Excluding something from the transitive scope would violate the parent requirement. That is the reason why forcing such an exclusion will be very hard to implement. In order to make it work, the aggregator would have to perform surgical modifications to the IU's that hold the requirements to the excluded IU. That in turn would imply changing the id's of those IU's to something else since IU's are assumed to be immutable. There's no way of knowing if the transitive scope will include an excluded IU until the validation has completed. I can agree that it would make sense to log a warning like "Excluded IU included transitively" or similar, when that happens.
I've been thinking a bit more on this. Perhaps a better solution would be to add a negative requirement for the excluded feature. I.e. a requirement that prevents it from being included in the plan. This would mean that any transitive requirement that isn't optional would cause the validation to fail. Optional requirements would simply be skipped though.
I think this sounds fine Thomas, as long as the validation failure message is good, e.g. "You have excluded a non-optional, transitive dependency..." Something like that, with absolute model paths for both the exclusion rule and the dependency (like we have now for other validation problems).
(In reply to comment #1) > Same question when you want to include a list of feature, but want to exclude a > transitive optional feature. > > The workaround is to not include any feature at all, but instead exclude every > other features. Very annoying. Note that in fact the workaround do not work. I have mapped a repository and excluding every features but featureA. featureA has an optional dependency on featureB. featureB is excluded. The resulting repository contains featureB... So I have currently no way to solve this issue.
I'm currently looking into this. It would be helpful if you could attach a b3aggr file to this bugzilla that we can use as base for discussion and test.
Created attachment 207404 [details] Config file for B3 With this B3 config file I want to create an aggregated repo containing indigo and a few JBoss tools (2 features). The 2 features have an optional dependency on "usage" feature. I want this feature be removed from the aggregated repo so I have added an exclusion but it is not taken into account.
I changed the implementation to use the negative requirement that I suggested in comment #3. It seems to work well. Julien, in order to exclude the jboss.tools.usage stuff it was necessary to exclude the bundle. Excluding the feature didn't help much. In order to fix that kind of problem, I had to extend the list of possible IU's for a map rule to also include bundles. Fixed on master with commit http://git.eclipse.org/c/b3/b3.git/commit/?id=6165ea694d857890b8ab9d8a8c8fc2ddeb3d08f9
Many thanks! Is there a place where I can get an updated version of B3? Maybe a test update site?
This change has been pushed to our regular update site.
I have just tested to exclude a few features and bundles but it seems one of the exclusions is not optional so I get the following error when doing "Validate aggregation": !ENTRY org.eclipse.b3.util 4 -364274674 2011-11-25 16:13:46.860 !MESSAGE Build failed! Exception was org.eclipse.core.runtime.CoreException: Cannot complete the install because some dependencies are not satisfiable !STACK 1 org.eclipse.core.runtime.CoreException: Cannot complete the install because some dependencies are not satisfiable at org.eclipse.b3.aggregator.engine.ValidationSetVerifier.run(ValidationSetVerifier.java:677) at org.eclipse.b3.aggregator.engine.Builder.runRepositoryVerifier(Builder.java:1700) at org.eclipse.b3.aggregator.engine.Builder.run(Builder.java:1631) at org.eclipse.b3.aggregator.presentation.AggregatorActionBarContributor$BuildAggregationAction$1.run(AggregatorActionBarContributor.java:292) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) !SUBENTRY 1 org.eclipse.equinox.p2.director 0 1 2011-11-25 16:13:46.860 !MESSAGE Cannot complete the install because some dependencies are not satisfiable Would it be possible to have at least the name of the dependency that is not satisfiable? Currently it is very hard to sort.
It really should show you a much nicer information than this. You don't get anything in the console?
I'm running B3 from Eclipse (right click on the root element then build aggregation). There is nothing in the console. Only the error view displays some logs (seems it is simply a visual presentation of workspace/.metadata/.log). there is nothing more than what I show in my previous comment.
Can you attach an aggregation that I can look at that shows this symptom?
Created attachment 207593 [details] Case of "Cannot complete the install because some dependencies are not satisfiable"
Did anyone file a follow-up issue for the problem from comment 11 ff ? I'm seeing the same unhelpful error right now. Not even logLevel DEBUG gives anything actionable. The strange thing: the same feature that I try to aggregate can be installed into eclipse from the same set of repositories as specified in the aggregation. What causes the validation to throw a CoreException with no relevant details? The same exception occurs within the IDE and when running b3 headless. B3 may be either 4.2 or 4.3, no difference.
[Bookkeeping change only. Moving bugs to the new "home" of aggregator, CBI. No change to assignee for resolved and verified bugs.]