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

Bug 326637

Summary: [director] Add option to list group ius to DirectorApplication
Product: [Eclipse Project] Equinox Reporter: Alin Dreghiciu <adreghiciu>
Component: p2Assignee: Pascal Rapicault <pascal>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: pascal
Version: unspecified   
Target Milestone: 3.7 M6   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Proposed patch
none
patch
none
patch none

Description Alin Dreghiciu CLA 2010-09-30 03:34:44 EDT
Build Identifier: 

Add a new option like "-listGroups" that will list the group ius from specified metadata repositories.
The list print information (as current -list) option in the format <iu id>/<iu version>.

Reproducible: Always
Comment 1 Alin Dreghiciu CLA 2010-09-30 09:05:29 EDT
Created attachment 179947 [details]
Proposed patch
Comment 2 DJ Houghton CLA 2010-09-30 10:55:36 EDT
Thanks for the patch. A couple of comments:

As discussed in bug 325371 we don't normally add public utility methods to internal classes. I have added a note to bug 325403 to add consider -listGroupIUs when we discuss this further.

Running the director with just the command and no args throws an exception before it gets to the more useful exception in #printGroupIUs. (this is also the case with -list, but I just missed it before) We should look at maybe adding local boolean vars to indicate whether or not artifact/metadata repositories are required or optional and then go from there. Not sure right now how to do this without too much refactoring in the app itself.
Comment 3 DJ Houghton CLA 2010-09-30 11:02:12 EDT
Created attachment 179964 [details]
patch

Actually I guess it isn't that hard. Here is a new patch with the proposed changes.
Comment 4 Alin Dreghiciu CLA 2010-09-30 11:07:20 EDT
(In reply to comment #3)

You have a misspell: metadataReposMadatory (missing 'n')
Comment 5 DJ Houghton CLA 2010-09-30 11:28:17 EDT
Created attachment 179973 [details]
patch
Comment 6 Pascal Rapicault CLA 2011-02-05 00:17:16 EST
I have fixed this in HEAD. The -list option of the director app can now take p2ql queries as an argument and I have introduced the shortcut Q:group to list all the groups.