Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 289380

Summary: [director] Install categories same from the director / UI
Product: [Eclipse Project] Equinox Reporter: Daniel Jacobowitz <dan>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: pascal, thomas
Version: 3.5Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Daniel Jacobowitz CLA 2009-09-14 13:49:59 EDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2
Build Identifier: 

You can install a category using the director, if you know its IU.  But the result is different than if you do it from the UI; in the UI, clicking on the category installs the category's members as roots.  The category IU is not installed at all.  In the director you get the category as a root.

I don't know which behavior is more useful.  If you install the category IU, then an update will bring in new members of the category, which is useful in some cases but surprising in others.

The more conservative choice would be to make the director do the same as the UI.

Reproducible: Always
Comment 1 Pascal Rapicault CLA 2009-09-16 21:40:59 EDT
This code leaves in the org.eclipse.equinox.p2.director.app bundle, class DirectorApplication. If you are willing to take a look at  patch this would be really great.
Comment 2 Daniel Jacobowitz CLA 2009-09-17 09:34:05 EDT
Just my opinion, but I think it shouldn't be new code in the director.  I recently wanted to do some operations I couldn't do from the director and wrote another application to invoke p2 APIs; the smarter the director (rather than the core / engine) is, the harder it is to use the core / engine.
Comment 3 Pascal Rapicault CLA 2009-09-19 15:49:04 EDT
Just to be sure I understand, are you suggesting that you would see this kind of behavior to be added to the planner (or closer to the core) rather than in higher levels?
Comment 4 Daniel Jacobowitz CLA 2009-09-19 22:34:56 EDT
Yes, I think so - either the planner, or e.g. ProfileChangeRequest#addInstallableUnits.
Comment 5 Thomas Hallgren CLA 2009-09-20 03:07:26 EDT
Now I'm concerned. I use the planner in aggregation situations to verify and determine what IU's to include in an aggregated result repository. I depend on that the planner includes the categories in that result. If the planner is changed, then that code needs to be changed too.

IMHO, when coding for P2 there are enough exceptions created by the current category concept already. Please don't add more.
Comment 6 Lars Vogel CLA 2019-11-14 03:41:02 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.