Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326637 - [director] Add option to list group ius to DirectorApplication
Summary: [director] Add option to list group ius to DirectorApplication
Status: CLOSED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Pascal Rapicault CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-30 03:34 EDT by Alin Dreghiciu CLA
Modified: 2011-02-05 00:17 EST (History)
1 user (show)

See Also:


Attachments
Proposed patch (8.67 KB, patch)
2010-09-30 09:05 EDT, Alin Dreghiciu CLA
no flags Details | Diff
patch (9.19 KB, patch)
2010-09-30 11:02 EDT, DJ Houghton CLA
no flags Details | Diff
patch (9.19 KB, patch)
2010-09-30 11:28 EDT, DJ Houghton CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.