Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 244841 - [p2] Installing/updating feature with includes is inconsistent
Summary: [p2] Installing/updating feature with includes is inconsistent
Status: RESOLVED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-21 12:28 EDT by Stephan Herrmann CLA
Modified: 2009-05-21 07:52 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2008-08-21 12:28:03 EDT
Build ID: I20080617-2000

We have a feature F1 which includes two other features
F2 and F3, where F2 happens to be a patch feature.

Normally, the user sees no difference in installing just
the top-level feature F1 or installing all three of them.
BUT, once he has explicitly installed all three, trying
to update the top-level feature F1, p2 does no longer find a 
valid provisioning plan.
(here "updating F1" is triggered by choosing a new version for
 installation, p2 will convert install request into update request)

This means: first install automatically includes "included" features,
but update, does not??

This would be tolerable if the error message from p2 would be 
digestable by a mere mortal. But p2 throws many complaints about
unsatisfied dependencies regarding the patch feature (which are 
in fact NOT a problem), and only somewhere in this jungle p2
reports that it failed to find a solution were both F3.v1 and F3.v2
are included (of course the actual message covers 5 lines and
is repeated five times).

Of course, trying to find a solution satisfying both requirements
is wrong in the first place, since F3 should simply be upgraded
to F3.v2 and everybody will be happy. After installing F1.v2 there
will be no feature requiring F3.v1 any way. What is p2 trying to do?
Comment 1 Pascal Rapicault CLA 2008-08-21 15:14:22 EDT
Are you installing from a p2 repository?
Could you please attach a small showing how to reproduce the problem? Thx.
Comment 2 Stephan Herrmann CLA 2008-08-21 16:27:04 EDT
Hi Pascal,

sorry to bother you again ;-)

(In reply to comment #1)
> Could you please attach a small showing how to reproduce the problem? Thx.

Mh, small something I don't have, but it is actually reproduceable
using the real-world stuff:


Use a clean Ganymede SDK (classic) and an empty workspace then:
1. add this site: http://www.objectteams.org/distrib/otdt-updates-1.2
2. untick "show only the latest ..."
3. under "OTDT 1.2.x ..." select all features with version 1.2.0.qualifier (three of em)
(Note: I usually also include the "OSGiPatchFeature" containing the patch 
from bug 235006, but magically this wasn't needed this time, just in case)
4. install including the recommended "reboot"
5. next time up, *only* select "Object Teams Development Tooling" version 1.2.1.qualifier
6. you should see "The software items ... not ... valid ..."
7. clicking "Yes" gives you all the gory details.

You may validate the cause by additionally selecting the other two
1.2.1.qualifier features and see installation succeed.

See what I mean?
Comment 3 Stephan Herrmann CLA 2009-05-21 07:52:38 EDT
In 3.5M7 it is still _possible_ to reproduce this problem,
but I managed to effectively _avoid_ this situation:

Following the discussion in various other bugs, the included 
feature should not be mentioned in any category,
thus the user has no chance to explicitly select it.
As long as the included features is not explicitly selected,
p2 will indeed correctly update this along with its parent feature.

Closing as wontfix since the solution is not a fix but
an avoidance strategy.

(Future: it'd be really cool if the category editor
would give a warning when adding a feature that is also
included from another feature in the set, no?)